|
- {
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information",
- "System.Net.Http.HttpClient": "Warning"
- }
- },
- "Serilog": {
- "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Async", "Serilog.Sinks.Console", "Serilog.Sinks.Exceptionless" ],
- "MinimumLevel": {
- "Default": "Verbose",
- "Override": {
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information",
- "System.Net.Http.HttpClient": "Warning"
- }
- },
- "WriteTo:Information": {
- "Name": "Async",
- "Args": {
- "Configure": [
- {
- "Name": "File",
- "Args": {
- "RestrictedToMinimumLevel": "Information",
- "RollingInterval": "Day",
- "RollOnFileSizeLimit": "true",
- "OutputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss }[{Level:u3}] [Thread-{ThreadId}] [{SourceContext:l}] {Message:lj}{NewLine}{Exception}",
- "Path": "/var/telpo_pushthird_ssl/logs/infos/info.log",
- "RetainedFileCountLimit": 7 // "--设置日志文件个数最大值,默认31,意思就是只保留最近的31个日志文件", "等于null时永远保留文件": null
- // "FileSizeLimitBytes": 20971520, //设置单个文件大小为3M 默认1G
- // "RollOnFileSizeLimit": true //超过文件大小后创建新的
-
- }
- }
- ]
- }
- },
- "WriteTo:Error": {
- "Name": "Async",
- "Args": {
- "Configure": [
- {
- "Name": "File",
- "Args": {
- "RestrictedToMinimumLevel": "Error",
- "RollingInterval": "Day",
- "RollOnFileSizeLimit": "true",
- "OutputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss }[{Level:u3}] [Thread-{ThreadId}][{SourceContext:l}] {Message:lj}{NewLine}{Exception}",
- "Path": "/var/telpo_pushthird_ssl/logs/errors/error.log",
- "RetainedFileCountLimit": 7 // "--设置日志文件个数最大值,默认31,意思就是只保留最近的31个日志文件", "等于null时永远保留文件": null
- // "FileSizeLimitBytes": 20971520, //设置单个文件大小为3M 默认1G
- // "RollOnFileSizeLimit": true //超过文件大小后创建新的
- }
- }
- ]
- }
- },
- "WriteTo:Console": {
- "Name": "Console",
- "Args": {
- "restrictedToMinimumLevel": "Verbose",
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss }[{Level:u3}] [Thread-{ThreadId}] [{SourceContext:l}] {Message:lj}{NewLine}{Exception}",
- "theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console"
- }
- },
- "WriteTo:Exceptionless": {
- "Name": "Exceptionless",
- "Args": {
- "serverUrl": "http://8.134.157.154:5000",
- "apiKey": "f2I0sng4BBQS9IAsbdBK1W71oOYGPpsC66s7pzJu"
- }
- }
- }
- }
|