Skip to content

Commit

Permalink
Enabled level label in samples
Browse files Browse the repository at this point in the history
  • Loading branch information
mishamyte committed Aug 15, 2021
1 parent 534840e commit 6901365
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sample/Serilog.Sinks.Grafana.Loki.Sample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public static void Main(string[] args)
"http://localhost:3100",
new List<LokiLabel> { new() { Key = "app", Value = "console" } },
credentials: null,
outputTemplate: OutputTemplate)
outputTemplate: OutputTemplate,
createLevelLabel: true)
.CreateLogger();

Log.Debug("This is a debug message");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"value": "web_app"
}
],
"outputTemplate": "[{ThreadId}] [{TraceId:l}] {Message}{NewLine}{Exception}"
"outputTemplate": "[{ThreadId}] [{TraceId:l}] {Message}{NewLine}{Exception}",
"createLevelLabel": true
}
}
]
Expand Down

0 comments on commit 6901365

Please sign in to comment.