The Free Software Media System - Server Backend & API
Add brackets around thread id
Bond-00996c9af590494
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.csindex 8f44327971..fa9b626744 100644--- a/Jellyfin.Server/Program.cs+++ b/Jellyfin.Server/Program.cs@@ -481,11 +481,11 @@ namespace Jellyfin.Servercatch (Exception ex){Serilog.Log.Logger = new LoggerConfiguration()- .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss}] [{Level:u3}] {ThreadId} {SourceContext}: {Message:lj} {NewLine}{Exception}")+ .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}").WriteTo.Async(x => x.File(Path.Combine(appPaths.LogDirectoryPath, "log_.log"),rollingInterval: RollingInterval.Day,- outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] {ThreadId} {SourceContext}:{Message} {NewLine}{Exception}"))+ outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}:{Message}{NewLine}{Exception}")).Enrich.FromLogContext().Enrich.WithThreadId().CreateLogger();diff --git a/Jellyfin.Server/Resources/Configuration/logging.json b/Jellyfin.Server/Resources/Configuration/logging.jsonindex 6bc2ed2ee4..e9f71afd49 100644--- a/Jellyfin.Server/Resources/Configuration/logging.json+++ b/Jellyfin.Server/Resources/Configuration/logging.json@@ -5,7 +5,7 @@{"Name": "Console","Args": {- "outputTemplate": "[{Timestamp:HH:mm:ss}] [{Level:u3}] {ThreadId} {SourceContext}: {Message:lj} {NewLine}{Exception}"+ "outputTemplate": "[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}"}},{@@ -20,7 +20,7 @@"retainedFileCountLimit": 3,"rollOnFileSizeLimit": true,"fileSizeLimitBytes": 100000000,- "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] {ThreadId} {SourceContext}:{Message} {NewLine}{Exception}"+ "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}:{Message}{NewLine}{Exception}"}}]