|
@@ -31,12 +31,8 @@ namespace Hotline.Logger
|
|
|
|
|
|
.WriteTo.Logger(configure => configure // 输出到文件
|
|
.WriteTo.Logger(configure => configure // 输出到文件
|
|
.MinimumLevel.Debug()
|
|
.MinimumLevel.Debug()
|
|
- .WriteTo.File( //单个日志文件,总日志,所有日志存到这里面
|
|
|
|
- $"logs\\log.txt",
|
|
|
|
- rollingInterval: RollingInterval.Day,
|
|
|
|
- outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}")
|
|
|
|
.WriteTo.RollingFile( //每天生成一个新的日志,按天来存日志
|
|
.WriteTo.RollingFile( //每天生成一个新的日志,按天来存日志
|
|
- "logs\\{Date}-log.txt", //定输出到滚动日志文件中,每天会创建一个新的日志,按天来存日志
|
|
|
|
|
|
+ "logs\\acc-log-{Date}.txt", //定输出到滚动日志文件中,每天会创建一个新的日志,按天来存日志
|
|
retainedFileCountLimit: 7,
|
|
retainedFileCountLimit: 7,
|
|
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
|
|
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
|
|
))
|
|
))
|