Beispiel #1
0
 public void Log(LogEvent logEvent)
 {
     lock (syncLock)
     {
         var oldColor = Console.ForegroundColor;
         Console.ForegroundColor = levelToColor[logEvent.Level];
         Console.Out.Write(LogEventFormatter.Format(logEvent));
         Console.ForegroundColor = oldColor;
     }
 }
Beispiel #2
0
 public void FormatProperties(IReadOnlyDictionary <string, object> properties, string expected)
 {
     LogEventFormatter.FormatProperties(properties).Should().Be(expected);
 }
Beispiel #3
0
 public void Log(LogEvent logEvent)
 {
     output.Invoke(LogEventFormatter.Format(logEvent));
 }
Beispiel #4
0
 public void FormatMessage(string template, object[] parameters, string expected)
 {
     LogEventFormatter.FormatMessage(template, parameters).Should().Be(expected);
 }