From f4df272a0b7907af25c32e611741ff641d2338d0 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Wed, 3 Dec 2025 10:34:58 +0100 Subject: [PATCH] Change the Windows Eventlog option type. Before this PR the Windows Eventlog option was incorrectly typed as a boolean but was intended to be the log name. This was confusing and caused a warning in the log that the option was incorrectly parsed. --- Duplicati/Library/RestAPI/Strings.cs | 2 +- Duplicati/Server/Program.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/Library/RestAPI/Strings.cs b/Duplicati/Library/RestAPI/Strings.cs index 5c77ca310..7a72fd53c 100644 --- a/Duplicati/Library/RestAPI/Strings.cs +++ b/Duplicati/Library/RestAPI/Strings.cs @@ -82,7 +82,7 @@ Error message: {0}", error); } public static string WebserverTokenDurationDescription { get { return LC.L(@"The duration of the refresh tokens issued by the server. This value indicates how much time can pass without activity before the user is asked to log in again. The value must be greater than zero and is capped at 30 days."); } } public static string DisabledbencryptionLong { get { return LC.L(@"Use this option to disable database encryption of sensitive fields"); } } public static string DisabledbencryptionShort { get { return LC.L(@"Disable database encryption"); } } - public static string LogwindowseventlogLong { get { return LC.L(@"Use this option to log to the Windows event log. The provided name is in the format Log:Source. If no log name is provided, Duplicati is used."); } } + public static string LogwindowseventlogLong { get { return LC.L(@"Use this option to log to the Windows event log. The provided name is in the format Log:Source. If no log name is provided, ""Duplicati 2"" is used."); } } public static string LogwindowseventlogShort { get { return LC.L(@"Log to the Windows event log"); } } public static string LogwindowseventloglevelLong { get { return LC.L(@"Use this option to set the log level for the Windows event log."); } } public static string LogwindowseventloglevelShort { get { return LC.L(@"Set the log level for the Windows event log"); } } diff --git a/Duplicati/Server/Program.cs b/Duplicati/Server/Program.cs index 1fdd3df75..40b622ca1 100644 --- a/Duplicati/Server/Program.cs +++ b/Duplicati/Server/Program.cs @@ -1047,7 +1047,7 @@ namespace Duplicati.Server /// private static readonly ICommandLineArgument[] WindowsOptions = OperatingSystem.IsWindows() ? [ - new CommandLineArgument(WINDOWS_EVENTLOG_OPTION, CommandLineArgument.ArgumentType.Boolean, Strings.Program.LogwindowseventlogShort, Strings.Program.LogwindowseventlogLong), + new CommandLineArgument(WINDOWS_EVENTLOG_OPTION, CommandLineArgument.ArgumentType.String, Strings.Program.LogwindowseventlogShort, Strings.Program.LogwindowseventlogLong), new CommandLineArgument(WINDOWS_EVENTLOG_LEVEL_OPTION, CommandLineArgument.ArgumentType.Enumeration, Strings.Program.LogwindowseventloglevelShort, Strings.Program.LogwindowseventloglevelLong, Library.Logging.LogMessageType.Information.ToString(), null, Enum.GetNames(typeof(Duplicati.Library.Logging.LogMessageType))) ] : [];