aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs
diff options
context:
space:
mode:
authorConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com>2020-05-29 17:42:42 -0500
committerConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com>2020-05-29 17:42:42 -0500
commit5d281adedd0d36f34dd3cb8344af3e6a44b5a29f (patch)
tree15bafdf4e3338872fb7e33e341282f4c50de0438 /Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs
parent70e50dfa90575cc5e906be1509d3ed363eb1ada4 (diff)
parent02624c9df8492b019539f235307108d49774434c (diff)
Merge remote-tracking branch 'upstream/master' into quickconnect
Diffstat (limited to 'Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs')
-rw-r--r--Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs b/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs
index 3bc32c047..89514c89b 100644
--- a/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs
+++ b/Jellyfin.Server/Migrations/Routines/CreateUserLoggingConfigFile.cs
@@ -36,6 +36,13 @@ namespace Jellyfin.Server.Migrations.Routines
@"{""Serilog"":{""MinimumLevel"":""Information"",""WriteTo"":[{""Name"":""Console"",""Args"":{""outputTemplate"":""[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}""}},{""Name"":""Async"",""Args"":{""configure"":[{""Name"":""File"",""Args"":{""path"":""%JELLYFIN_LOG_DIR%//log_.log"",""rollingInterval"":""Day"",""retainedFileCountLimit"":3,""rollOnFileSizeLimit"":true,""fileSizeLimitBytes"":100000000,""outputTemplate"":""[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}:{Message}{NewLine}{Exception}""}}]}}],""Enrich"":[""FromLogContext"",""WithThreadId""]}}",
};
+ private readonly IApplicationPaths _appPaths;
+
+ public CreateUserLoggingConfigFile(IApplicationPaths appPaths)
+ {
+ _appPaths = appPaths;
+ }
+
/// <inheritdoc/>
public Guid Id => Guid.Parse("{EF103419-8451-40D8-9F34-D1A8E93A1679}");
@@ -43,9 +50,9 @@ namespace Jellyfin.Server.Migrations.Routines
public string Name => "CreateLoggingConfigHeirarchy";
/// <inheritdoc/>
- public void Perform(CoreAppHost host, ILogger logger)
+ public void Perform()
{
- var logDirectory = host.Resolve<IApplicationPaths>().ConfigurationDirectoryPath;
+ var logDirectory = _appPaths.ConfigurationDirectoryPath;
var existingConfigPath = Path.Combine(logDirectory, "logging.json");
// If the existing logging.json config file is unmodified, then 'reset' it by moving it to 'logging.old.json'