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

16 lines
424 B
C#
Raw 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
{
public class MyLogger
{
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();
}
}