Skip to content

Commit 6901365

Browse files
committed
Enabled level label in samples
1 parent 534840e commit 6901365

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

sample/Serilog.Sinks.Grafana.Loki.Sample/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public static void Main(string[] args)
2222
"http://localhost:3100",
2323
new List<LokiLabel> { new() { Key = "app", Value = "console" } },
2424
credentials: null,
25-
outputTemplate: OutputTemplate)
25+
outputTemplate: OutputTemplate,
26+
createLevelLabel: true)
2627
.CreateLogger();
2728

2829
Log.Debug("This is a debug message");

sample/Serilog.Sinks.Grafana.Loki.SampleWebApp/appsettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"value": "web_app"
3232
}
3333
],
34-
"outputTemplate": "[{ThreadId}] [{TraceId:l}] {Message}{NewLine}{Exception}"
34+
"outputTemplate": "[{ThreadId}] [{TraceId:l}] {Message}{NewLine}{Exception}",
35+
"createLevelLabel": true
3536
}
3637
}
3738
]

0 commit comments

Comments
 (0)