public ActionResult <string> Get(string name) { Serilogger.Information("Serilog Log: Write log on console from API (Serilog)."); Serilogger.Information("Serilog: Hello " + name); Console.WriteLine("Console Log: Write log on console from API."); return("Hello " + name); }
private static void LogObject() { var thing = new Thing() { Color = "Red", Height = 23.5, Id = 1, Name = "Thing1" }; Logger4Net.Info($"thing: {thing}"); Serilogger.Information("{@Thing}", thing); }
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 InfoFormat(int eventId, string format, params object[] args) { Serilogger.Information("{EventID} - {Message}", eventId, String.Format(format, args)); }
public void InfoFormat(string format, params object[] args) { Serilogger.Information("{message}", String.Format(format, args)); }
public void Info(int eventId, object message, Exception exception) { Serilogger.Information(exception, "{EventID} - {Message}", eventId, message); }
public void Info(int eventId, object message) { Serilogger.Information("{EventID} - {Message}", eventId, message); }
public void Info(object message, Exception exception) { Serilogger.Information(exception, message.ToString(), message); }
public void Info(object message) { Serilogger.Information("{message}", message); }
public void Info(string message) { Serilogger.Information(message); }