Example #1
0
 public ConsoleLogWriter(TextBox textBox)
 {
     TextBox = textBox;
     Logger  = LoggerHelper.CreateLoggerHelper();
 }
Example #2
0
        private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            var logger = LoggerHelper.CreateLoggerHelper(System.IO.Path.Combine(DateTime.Now.ToString("yyyy-MM-dd"), "exception.log"));

            logger.Log(NLog.LogLevel.Fatal, (e.ExceptionObject as Exception).ToString());
        }