From 86e41f6afbf2cbd855d6441d58c160afc1fed7bc Mon Sep 17 00:00:00 2001 From: root Date: Sat, 28 Dec 2024 00:35:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=96=87=E5=AD=97=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=20=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Handlers/CommandLine/EnableDevLogger.cs | 2 +- src/SerilogConfig.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Handlers/CommandLine/EnableDevLogger.cs b/src/Handlers/CommandLine/EnableDevLogger.cs index 3208f60..39ac720 100644 --- a/src/Handlers/CommandLine/EnableDevLogger.cs +++ b/src/Handlers/CommandLine/EnableDevLogger.cs @@ -8,7 +8,7 @@ namespace iFileProxy.Handlers.CommandLine { public void Process() { - Console.WriteLine("developer logging is enabled."); + Console.WriteLine("dev level logging is enabled."); // 具体的实现在SerilogConfig.cs中 此处仅作提示 } } diff --git a/src/SerilogConfig.cs b/src/SerilogConfig.cs index a6ec49a..17b166f 100644 --- a/src/SerilogConfig.cs +++ b/src/SerilogConfig.cs @@ -44,7 +44,7 @@ .WriteTo.Logger(lc => lc .Filter.ByIncludingOnly(evt => evt.Level == LogEventLevel.Error) .WriteTo.File( - Path.Combine(baseLogPath, $"{appName}.error.date.log"), + Path.Combine(baseLogPath, $"{appName}.error..log"), outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] [{SourceContext}] {ClientIp} {Message:lj} {contentType} {queryString}{NewLine}{Exception}", rollingInterval: RollingInterval.Day, fileSizeLimitBytes: 1073741824)) // 1GB @@ -52,7 +52,7 @@ .WriteTo.Logger(lc => lc .Filter.ByIncludingOnly(evt => evt.Level == LogEventLevel.Fatal) .WriteTo.File( - Path.Combine(baseLogPath, $"{appName}.fatal.date.log"), + Path.Combine(baseLogPath, $"{appName}.fatal..log"), outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] [{SourceContext}] {ClientIp} {Message:lj} {contentType} {queryString}{NewLine}{Exception}", rollingInterval: RollingInterval.Day, fileSizeLimitBytes: 1073741824)) // 1GB @@ -60,7 +60,7 @@ .WriteTo.Logger(lc => lc .Filter.ByIncludingOnly(evt => evt.Level == LogEventLevel.Warning) .WriteTo.File( - Path.Combine(baseLogPath, $"{appName}.warning.date.log"), + Path.Combine(baseLogPath, $"{appName}.warning..log"), outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] [{SourceContext}] {ClientIp} {Message:lj} {contentType} {queryString}{NewLine}{Exception}", rollingInterval: RollingInterval.Day, fileSizeLimitBytes: 1073741824)) @@ -68,7 +68,7 @@ .WriteTo.Logger(lc => lc .Filter.ByIncludingOnly(evt => evt.Level == LogEventLevel.Information) .WriteTo.File( - Path.Combine(baseLogPath, $"{appName}.info.date.log"), + Path.Combine(baseLogPath, $"{appName}.info..log"), outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] [{SourceContext}] {ClientIp} {Message:lj} {contentType} {queryString}{NewLine}{Exception}", rollingInterval: RollingInterval.Day, fileSizeLimitBytes: 1073741824)) @@ -76,7 +76,7 @@ .WriteTo.Logger(lc => lc .Filter.ByIncludingOnly(evt => evt.Level == LogEventLevel.Debug) .WriteTo.File( - Path.Combine(baseLogPath, $"{appName}.debug.date.log"), + Path.Combine(baseLogPath, $"{appName}.debug..log"), outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] [{SourceContext}] {ClientIp} {Message:lj} {contentType} {queryString}{NewLine}{Exception}", rollingInterval: RollingInterval.Day, fileSizeLimitBytes: 1073741824))