public override void Write(LogLevel logLevel, string message, params object[] args) { Console.WriteLine(message); if (args.Length == 1) { if (args[0] is Exception e) { Console.WriteLine( Formatting.ExceptionForLogging(e, true) ); } } }
public override void Write(LogLevel logLevel, string message, params object[] args) { StreamWriter.WriteLine(message); if (args.Length == 1) { if (args[0] is ReflectionTypeLoadException rtle) { StreamWriter.WriteLine( Formatting.ReflectionTypeLoadExceptionForLogging(rtle) ); } else if (args[0] is Exception e) { StreamWriter.WriteLine( Formatting.ExceptionForLogging(e, true) ); } } }