From f9653dd01fbc7cd9955c08bc496834a574373512 Mon Sep 17 00:00:00 2001 From: ereshkigal Date: Sat, 7 Sep 2024 12:13:28 +0300 Subject: [PATCH] logging operational --- Program.cs | 4 +--- appsettings.json | 11 ++++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Program.cs b/Program.cs index d49410b..1d1fbe2 100644 --- a/Program.cs +++ b/Program.cs @@ -4,7 +4,7 @@ var builder = WebApplication.CreateBuilder(args); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); - +configureLogging(); var app = builder.Build(); // Configure the HTTP request pipeline. @@ -33,5 +33,3 @@ void configureLogging(){ .ReadFrom.Configuration(configuration) .CreateLogger(); } - -} \ No newline at end of file diff --git a/appsettings.json b/appsettings.json index 10f68b8..b44ff91 100644 --- a/appsettings.json +++ b/appsettings.json @@ -5,5 +5,14 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "Serilog":{ + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Information", + "System": "Warning" + } + } + } }