|
- {
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information",
- "HttpClient": "Information"
- }
- },
- "Serilog": {
- "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Console", "Serilog.Expressions" ],
- "MinimumLevel": {
- "Default": "Information",
- "Override": {
- "Microsoft": "Warning",
- "System": "Warning"
- }
- },
- "Enrich": [
- "FromLogContext",
- "WithThreadId"
- ],
- "WriteTo": [
- {
- "Name": "Console",
- "Args": {
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level}] [Thread-{ThreadId}] [{SourceContext:l}] [{RequestId}]{NewLine}{Message}{NewLine}"
- }
- },
- {
- "Name": "Logger",
- "Args": {
- "ConfigureLogger": {
- "WriteTo": [
- {
- "Name": "File",
- "Args": {
- "restrictedToMinimumLevel": "Information",
- "path": "/var/health_monitor/logs/infos/info.log",
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level}] [Thread-{ThreadId}] [{SourceContext:l}] [{RequestId}] {Message}{NewLine}{Exception}",
- //"fileSizeLimitBytes": 524288000,
- "rollingInterval": "Day",
- "rollOnFileSizeLimit": "true",
- "retainedFileCountLimit": 7
- }
- }
- ],
- "Filter": [
- {
- "Name": "ByIncludingOnly",
- "Args": {
- "Expression": "@l = 'Information'"
- }
- }
- ]
- }
- }
- },
- {
- "Name": "Logger",
- "Args": {
- "ConfigureLogger": {
- "WriteTo": [
- {
- "Name": "File",
- "Args": {
- "RestrictedToMinimumLevel": "Warning",
- "RollingInterval": "Day",
- "RollOnFileSizeLimit": "true",
- "OutputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff }[{Level:u3}] [Thread-{ThreadId}] [{SourceContext:l}] [{RequestId}] {Message:lj}{NewLine}",
- "Path": "/var/health_monitor/logs/warnings/warn.log",
- "RetainedFileCountLimit": 10
- }
- }
- ],
- "Filter": [
- {
- "Name": "ByIncludingOnly",
- "Args": {
- "Expression": "@l = 'Warning'"
- }
- }
- ]
- }
- }
- },
- {
- "Name": "Logger",
- "Args": {
- "ConfigureLogger": {
- "WriteTo": [
- {
- "Name": "File",
- "Args": {
- "restrictedToMinimumLevel": "Error",
- "path": "/var/health_monitor/logs/errors/error.log",
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level}] [Thread-{ThreadId}] [{SourceContext:l}] [{RequestId}] {Message}{NewLine}{Exception}",
- //"fileSizeLimitBytes": 524288000,
- "rollingInterval": "Day",
- "rollOnFileSizeLimit": "true",
- "retainedFileCountLimit": 7
- }
- }
- ],
- "Filter": [
- {
- "Name": "ByIncludingOnly",
- "Args": {
- "Expression": "@l = 'Error'"
- }
- }
- ]
- }
- }
- }
- ]
- },
- //"Logging": {
- // "LogLevel": {
- // "Default": "Information",
- // "Microsoft.AspNetCore": "Warning"
- // }
- //},
- "AllowedHosts": "*"
- }
|