aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-08-04 10:47:46 -0500
committerJP Dillingham <jp@dillingham.me>2025-08-04 10:47:46 -0500
commit219aa156446e2465783cc018510cd9a18e643bb7 (patch)
tree3a68418b876a4f1dbed9c5aabedbd2644ce32277 /src
parentffa2b220221040997e9ebacb4a08136e80c9a7b3 (diff)
downloadslskd-219aa156446e2465783cc018510cd9a18e643bb7.tar.gz
use a string for diagnostic level (match other enums)
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Core/Options.cs5
-rw-r--r--src/slskd/Program.cs2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs
index 1fed70f5..4d4c1e68 100644
--- a/src/slskd/Core/Options.cs
+++ b/src/slskd/Core/Options.cs
@@ -36,10 +36,10 @@ namespace slskd
using slskd.Relay;
using slskd.Shares;
using slskd.Validation;
- using Soulseek.Diagnostics;
using Utility.CommandLine;
using Utility.EnvironmentVariables;
using YamlDotNet.Serialization;
+ using SoulseekDiagnostics = Soulseek.Diagnostics;
/// <summary>
/// Disambiguates options derived at startup from options that may update at run time.
@@ -1572,8 +1572,9 @@ namespace slskd
[Argument(default, "slsk-diag-level")]
[EnvironmentVariable("SLSK_DIAG_LEVEL")]
[Description("minimum diagnostic level (None, Warning, Info, Debug)")]
+ [Enum(typeof(SoulseekDiagnostics.DiagnosticLevel))]
[RequiresRestart]
- public DiagnosticLevel DiagnosticLevel { get; init; } = DiagnosticLevel.Info;
+ public string DiagnosticLevel { get; init; } = SoulseekDiagnostics.DiagnosticLevel.Info.ToString().ToLowerInvariant();
/// <summary>
/// Gets options for the distributed network.
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index 89230e2a..645e395c 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -584,7 +584,7 @@ namespace slskd
new SoulseekClient(options: new SoulseekClientOptions(
maximumConcurrentUploads: OptionsAtStartup.Global.Upload.Slots,
maximumConcurrentDownloads: OptionsAtStartup.Global.Download.Slots,
- minimumDiagnosticLevel: OptionsAtStartup.Soulseek.DiagnosticLevel)));
+ minimumDiagnosticLevel: OptionsAtStartup.Soulseek.DiagnosticLevel.ToEnum<Soulseek.Diagnostics.DiagnosticLevel>())));
// add the core application service to DI as well as a hosted service so that other services can
// access instance methods