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