private static void LogException() { try { throw new ApplicationException("Exceptions happen!"); } catch (Exception exception) { Logger4Net.Error($"A {exception.GetType()} exception", exception); Serilogger.Error(exception, $"A {exception.GetType()} exception"); Serilogger.Debug("{@Exception}", exception); } }
private static void LogSimpleMessage() { string message = "There are many messages but this one is mine!"; Logger4Net.Info(message); Logger4Net.Debug(message); Logger4Net.Warn(message); Logger4Net.Error(message); Logger4Net.Fatal(message); Serilogger.Information(message); Serilogger.Debug(message); Serilogger.Warning(message); Serilogger.Error(message); Serilogger.Fatal(message); }