19 lines
709 B
C#
19 lines
709 B
C#
namespace NetinaShop.Api.WebFramework.Configurations;
|
|
|
|
public static class LoggerConfig
|
|
{
|
|
public static void ConfigureSerilog()
|
|
{
|
|
var logName = $"{DirectoryAddress.Logs}/Log_Server_.log";
|
|
Log.Logger = new LoggerConfiguration()
|
|
.Enrich.FromLogContext()
|
|
.WriteTo.Console(theme: AnsiConsoleTheme.Literate)
|
|
.WriteTo.Sentry(o =>
|
|
{
|
|
o.MinimumEventLevel = LogEventLevel.Error;
|
|
o.Dsn = "https://592b7fbb29464442a8e996247abe857f@watcher.igarson.app/7";
|
|
})
|
|
.MinimumLevel.Override("Microsoft.EntityFrameworkCore.Database.Command", LogEventLevel.Warning)
|
|
.CreateLogger();
|
|
}
|
|
} |