16 lines
431 B
C#
16 lines
431 B
C#
using Serilog;
|
|
using Serilog.Core;
|
|
using Serilog.Exceptions;
|
|
|
|
namespace auto_creamapi.Utils
|
|
{
|
|
public static class MyLogger
|
|
{
|
|
public static readonly Logger Log = new LoggerConfiguration()
|
|
.MinimumLevel.Debug()
|
|
.Enrich.WithExceptionDetails()
|
|
.WriteTo.Console()
|
|
.WriteTo.File("autocreamapi.log", rollingInterval: RollingInterval.Day)
|
|
.CreateLogger();
|
|
}
|
|
} |