|
@@ -3,7 +3,7 @@
|
|
|
"Using": [
|
|
|
"Serilog.Enrichers.Span",
|
|
|
"Serilog.Sinks.Console",
|
|
|
- "Serilog.Sinks.Exceptionless"
|
|
|
+ "Serilog.Sinks.Grafana.Loki"
|
|
|
],
|
|
|
"MinimumLevel": {
|
|
|
"Default": "Information",
|
|
@@ -26,6 +26,22 @@
|
|
|
"theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console"
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ "Name": "GrafanaLoki",
|
|
|
+ "Args": {
|
|
|
+ "outputTemplate": "[{Timestamp:HH:mm:ss} {Level}] {SourceContext} [{TraceId}]{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}",
|
|
|
+ "uri": "http://192.168.100.217:3100",
|
|
|
+ "labels": [
|
|
|
+ {
|
|
|
+ "key": "app",
|
|
|
+ "value": "hotline"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "propertiesAsLabels": [
|
|
|
+ "fwhl"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
//{
|
|
|
// "Name": "Exeptionless",
|
|
|
// "Args": {
|
|
@@ -41,17 +57,17 @@
|
|
|
// "rollingInterval": "Day"
|
|
|
// }
|
|
|
//},
|
|
|
- {
|
|
|
- "Name": "MongoDBBson",
|
|
|
- "Args": {
|
|
|
- "databaseUrl": "mongodb://192.168.100.121:27017/hotline_logs",
|
|
|
- "collectionName": "logs",
|
|
|
- "cappedMaxSizeMb": "1024",
|
|
|
- "cappedMaxDocuments": "50000",
|
|
|
- "rollingInterval": "Day",
|
|
|
- "outputTemplate": "[{Timestamp:HH:mm:ss} {Level}] {SourceContext} [{TraceId}]{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}"
|
|
|
- }
|
|
|
- }
|
|
|
+ //{
|
|
|
+ // "Name": "MongoDBBson",
|
|
|
+ // "Args": {
|
|
|
+ // "databaseUrl": "mongodb://192.168.100.121:27017/hotline_logs",
|
|
|
+ // "collectionName": "logs",
|
|
|
+ // "cappedMaxSizeMb": "1024",
|
|
|
+ // "cappedMaxDocuments": "50000",
|
|
|
+ // "rollingInterval": "Day",
|
|
|
+ // "outputTemplate": "[{Timestamp:HH:mm:ss} {Level}] {SourceContext} [{TraceId}]{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}"
|
|
|
+ // }
|
|
|
+ //}
|
|
|
],
|
|
|
"Enrich": [ "FromLogContext", "WithSpan" ]
|
|
|
},
|