auto-creamapi-2/auto-creamapi/Utils/MyLogger.cs

16 lines
431 B
C#
Raw Permalink Normal View History

2020-12-19 19:14:40 -05:00
using Serilog;
using Serilog.Core;
2021-02-15 10:51:50 -05:00
using Serilog.Exceptions;
2020-12-19 19:14:40 -05:00
namespace auto_creamapi.Utils
{
2023-12-23 14:51:30 -05:00
public static class MyLogger
2020-12-19 19:14:40 -05:00
{
public static readonly Logger Log = new LoggerConfiguration()
.MinimumLevel.Debug()
2021-02-15 10:51:50 -05:00
.Enrich.WithExceptionDetails()
2020-12-19 19:14:40 -05:00
.WriteTo.Console()
.WriteTo.File("autocreamapi.log", rollingInterval: RollingInterval.Day)
.CreateLogger();
}
}