Exemple #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;
     }
 }
Exemple #2
0
 public void FormatProperties(IReadOnlyDictionary <string, object> properties, string expected)
 {
     LogEventFormatter.FormatProperties(properties).Should().Be(expected);
 }
Exemple #3
0
 public void Log(LogEvent logEvent)
 {
     output.Invoke(LogEventFormatter.Format(logEvent));
 }
Exemple #4
0
 public void FormatMessage(string template, object[] parameters, string expected)
 {
     LogEventFormatter.FormatMessage(template, parameters).Should().Be(expected);
 }