public static void LogInfo(string info, string type) { try { LogJob job = new LogJob(info, type); ThreadPool.QueueUserWorkItem(f => job.DoWork()); } catch (Exception) { } }
public static void LogInfo(string info, string type) { try { LogJob job = new LogJob(info, type); System.Threading.Thread worker = new System.Threading.Thread(job.DoWork); worker.Start(); } catch(Exception) {} }
public static void LogInfo(string info, string type) { try { LogJob job = new LogJob(info, type); System.Threading.Thread worker = new System.Threading.Thread(job.DoWork); worker.Start(); } catch (Exception) {} }
public static void LogInfo(string info, Exception ex, string type) { try { info += " "; if (ex != null) { if (ex.InnerException != null) { info += ex.InnerException.Message + " " + ex.InnerException.StackTrace; } else { info += ex.Message + " " + ex.StackTrace; } } LogJob job = new LogJob(info, type); HostingEnvironment.QueueBackgroundWorkItem(f => job.DoWork()); } catch (Exception) { } }