diff --git a/src/fiskaltrust.Launcher/Commands/Common.cs b/src/fiskaltrust.Launcher/Commands/Common.cs index 9f80679d..ad9f3b55 100644 --- a/src/fiskaltrust.Launcher/Commands/Common.cs +++ b/src/fiskaltrust.Launcher/Commands/Common.cs @@ -187,7 +187,7 @@ public static async Task HandleAsync( // will exit with non-zero exit code later. Log.Fatal(e, "Could not read Cashbox configuration file."); } - + launcherConfiguration.LogConfigurationWarnings(Log.Logger); var cashboxConfiguration = new ftCashBoxConfiguration(); try { diff --git a/src/fiskaltrust.Launcher/Commands/ConfigCommand.cs b/src/fiskaltrust.Launcher/Commands/ConfigCommand.cs index 7d707fa6..16eea9cd 100644 --- a/src/fiskaltrust.Launcher/Commands/ConfigCommand.cs +++ b/src/fiskaltrust.Launcher/Commands/ConfigCommand.cs @@ -123,7 +123,6 @@ public static async Task HandleAsync(ConfigSetOptions configSetOptions) } launcherConfiguration.OverwriteWith(configSetOptions.ArgsLauncherConfiguration); - LogConfigurationWarnings(launcherConfiguration); string rawLauncherConfigurationNew; rawLauncherConfigurationNew = launcherConfiguration.Serialize(true, true); @@ -175,14 +174,6 @@ public static async Task HandleAsync(ConfigSetOptions configSetOptions) return 0; } - - private static void LogConfigurationWarnings(LauncherConfiguration launcherConfiguration) - { - if (launcherConfiguration.UseLegacyDataProtection.HasValue) - { - Log.Warning("Configuration 'UseLegacyDataProtection' is depreciated and will be removed in future."); - } - } } public class ConfigGetCommand : Command diff --git a/src/fiskaltrust.Launcher/Extensions/LauncherConfigurationExtension.cs b/src/fiskaltrust.Launcher/Extensions/LauncherConfigurationExtension.cs new file mode 100644 index 00000000..3ab80bd8 --- /dev/null +++ b/src/fiskaltrust.Launcher/Extensions/LauncherConfigurationExtension.cs @@ -0,0 +1,15 @@ +using fiskaltrust.Launcher.Common.Configuration; + +namespace fiskaltrust.Launcher.Extensions +{ + static class LauncherConfigurationExtension + { + public static void LogConfigurationWarnings(this LauncherConfiguration launcherConfiguration, Serilog.ILogger logger) + { + if (launcherConfiguration.UseLegacyDataProtection.HasValue) + { + logger.Warning("Configuration 'UseLegacyDataProtection' is depreciated and will be removed in future."); + } + } + } +}