更改文字描述 优化日志文件名

This commit is contained in:
root 2024-12-28 00:35:11 +08:00
parent 9743cf1460
commit 86e41f6afb
2 changed files with 6 additions and 6 deletions

View file

@ -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中 此处仅作提示
}
}

View file

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