From caab32ca9830d2f5f11816f7165ac7b6403a924e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D0=B0?= Date: Mon, 29 Apr 2024 18:47:56 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B0=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UniversityClientApp/appsettings.json | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/University/UniversityClientApp/appsettings.json b/University/UniversityClientApp/appsettings.json index 10f68b8..6759c11 100644 --- a/University/UniversityClientApp/appsettings.json +++ b/University/UniversityClientApp/appsettings.json @@ -1,9 +1,42 @@ { + "Serilog": { + "Using": [ "Serilog.Sinks.File" ], + "MinimumLevel": "Information", + "WriteTo": [ + { + "Name": "File", + "Args": { + "path": "Logs/log_.log", + "rollingInterval": "Day", + "outputTemplate": "[{Timestamp:HH:mm:ss.fff}] {Level:u4}: {Message:lj}{NewLine}{Exception}" + } + } + ], + "Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ], + "Destructure": [ + { + "Name": "ToMaximumDepth", + "Args": { "maximumDestructuringDepth": 3 } + }, + { + "Name": "ToMaximumStringLength", + "Args": { "maximumStringLength": 100 } + }, + { + "Name": "ToMaximumCollectionCount", + "Args": { "maximumCollectionCount": 10 } + } + ], + "Properties": { + "Application": "University" + } + }, + "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } - }, - "AllowedHosts": "*" + } } +