From 885bc11b67f7b8131b4695000608a08a928b935e Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Tue, 17 Mar 2020 14:30:08 +0100 Subject: [PATCH] Log 'JELLYFIN_' environment variables at application start --- Emby.Server.Implementations/ApplicationHost.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index acae23052..3576b616e 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -897,6 +897,18 @@ namespace Emby.Server.Implementations .GetCommandLineArgs() .Distinct(); + // Get all 'JELLYFIN_' prefixed environment variables + var allEnvVars = Environment.GetEnvironmentVariables(); + var jellyfinEnvVars = new Dictionary(); + foreach (var key in allEnvVars.Keys) + { + if (key.ToString().StartsWith("JELLYFIN_", StringComparison.OrdinalIgnoreCase)) + { + jellyfinEnvVars.Add(key, allEnvVars[key]); + } + } + + logger.LogInformation("Environment Variables: {EnvVars}", jellyfinEnvVars); logger.LogInformation("Arguments: {Args}", commandLineArgs); logger.LogInformation("Operating system: {OS}", OperatingSystem.Name); logger.LogInformation("Architecture: {Architecture}", RuntimeInformation.OSArchitecture);