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))