diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-02-10 21:14:33 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-02-10 21:14:33 -0600 |
| commit | 62b44e06b3f311970e8835d647c97de5498f394e (patch) | |
| tree | b5092784b31eb056c3159899cccf2eab776a1bc4 /src/slskd/Program.cs | |
| parent | b82b594008e1f8bd331384d50d4a4aa31ef61045 (diff) | |
| download | slskd-62b44e06b3f311970e8835d647c97de5498f394e.tar.gz | |
simplify option mapping
Diffstat (limited to 'src/slskd/Program.cs')
| -rw-r--r-- | src/slskd/Program.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index 4621abf5..834c35a9 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -161,7 +161,7 @@ namespace slskd outputTemplate: "[{SourceContext}] [{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}") .WriteTo.Async(config => config.File( - "logs/slskd-.log", + $"logs/{AppName}-.log", outputTemplate: "[{SourceContext}] [{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}", rollingInterval: RollingInterval.Day)) .WriteTo.Conditional( @@ -186,7 +186,7 @@ namespace slskd outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}") .WriteTo.Async(config => config.File( - "logs/slskd-.log", + $"logs/{AppName}-.log", outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}", rollingInterval: RollingInterval.Day)) .WriteTo.Conditional( @@ -272,10 +272,10 @@ namespace slskd return builder .AddDefaultValues( - map: Options.Map.Select(o => o.ToDefaultValue())) + map: Options.Map) .AddEnvironmentVariables( prefix: environmentVariablePrefix, - map: Options.Map.Select(o => o.ToEnvironmentVariable())) + map: Options.Map) .AddYamlFile( path: Path.GetFileName(configurationFile), optional: true, @@ -283,7 +283,7 @@ namespace slskd provider: new PhysicalFileProvider(Path.GetDirectoryName(configurationFile), ExclusionFilters.None)) .AddCommandLine( commandLine: Environment.CommandLine, - map: Options.Map.Select(o => o.ToCommandLineArgument())); + map: Options.Map); } private static void GenerateX509Certificate(string password, string filename) |
