aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-06-07 13:50:21 -0500
committerJP Dillingham <jp@dillingham.me>2026-06-07 13:50:21 -0500
commit0145a4d87ebe474aba82e2ad136eb9f5d652cc12 (patch)
treea28dde53ee8122cbb15bace2078fc56446fba724 /src/slskd/Program.cs
parente71eade0131b16c01f77637088c1e44ee07b3af6 (diff)
downloadslskd-0145a4d87ebe474aba82e2ad136eb9f5d652cc12.tar.gz
use the default message formatter for Loki (previous format prevented capture of properties)
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index 39c0d2ac..9a2914ea 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -1008,6 +1008,7 @@ namespace slskd
services.AddSwaggerGen(options =>
{
options.DescribeAllParametersInCamelCase();
+ options.CustomSchemaIds(type => type.FullName);
options.SwaggerDoc("v0", new OpenApiInfo
{
Version = "v0",
@@ -1217,6 +1218,7 @@ namespace slskd
.MinimumLevel.Override("slskd.Authentication.PassthroughAuthenticationHandler", LogEventLevel.Warning)
.MinimumLevel.Override("slskd.Authentication.ApiKeyAuthenticationHandler", LogEventLevel.Warning)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore.Database.Command", LogEventLevel.Warning) // bump this down to Information to show SQL
+ .Enrich.WithProperty("App", AppName)
.Enrich.WithProperty("InstanceName", OptionsAtStartup.InstanceName)
.Enrich.WithProperty("InvocationId", InvocationId)
.Enrich.WithProperty("ProcessId", ProcessId)
@@ -1239,9 +1241,7 @@ namespace slskd
{
if (!string.IsNullOrEmpty(OptionsAtStartup.Logger.Loki))
{
- config.GrafanaLoki(
- OptionsAtStartup.Logger.Loki,
- textFormatter: new MessageTemplateTextFormatter("[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"));
+ config.GrafanaLoki(OptionsAtStartup.Logger.Loki);
}
})
.WriteTo.Sink(new DelegatingSink(logEvent =>