Exemplo n.º 1
0
        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);
        }
 public void WarnFormat(int eventId, string format, params object[] args)
 {
     Serilogger.Warning("{EventID} - {Message}", eventId, String.Format(format, args));
 }
 public void WarnFormat(string format, params object[] args)
 {
     Serilogger.Warning("{message}", String.Format(format, args));
 }
 public void Warn(int eventId, object message, Exception exception)
 {
     Serilogger.Warning(exception, "{EventID} - {Message}", eventId, message);
 }
 public void Warn(int eventId, object message)
 {
     Serilogger.Warning("{EventID} - {Message}", eventId, message);
 }
 public void Warn(object message, Exception exception)
 {
     Serilogger.Warning(exception, "{message}", message);
 }
 public void Warn(object message)
 {
     Serilogger.Warning("{message}", message);
 }
 public void Warn(string message)
 {
     Serilogger.Warning(message);
 }