예제 #1
0
 public BetterLog(string path, BetterLogSettings settings)
 {
     LogSettings  = settings;
     streamWriter = new StreamWriter(path)
     {
         AutoFlush = true
     };
     formatter = new BetterLogFormatter(settings.Formatter);
 }
예제 #2
0
        public void OnLogMessage(string logName, LogLevel level, object message, Object context, Exception exception, IStackTrace location)
        {
            var formatted = BetterLogFormatter.GetFormattedLogLine(level, message, exception);

            writer.WriteLine(formatted);
        }