diff --git a/ATxService/AutoTx.cs b/ATxService/AutoTx.cs index 80e7f6db4bd9b223f305ef8b0ae2d88f3628ef2c..2d9f6d504b5dc18f75458f3918e38664812c06a1 100644 --- a/ATxService/AutoTx.cs +++ b/ATxService/AutoTx.cs @@ -285,7 +285,10 @@ namespace ATxService // this should terminate the service process: throw new Exception("Error loading configuration."); } + // update the file logger with the configured log level: SetupFileLogging(_config.LogLevel); + // the mail logger requires the configuration to be present, so we can call it now: + SetupMailLogging(); } /// <summary> @@ -311,10 +314,6 @@ namespace ATxService /// Check if loaded configuration is valid, print a summary to the log. /// </summary> private void CheckConfiguration() { - // non-critical / optional configuration parameters: - if (!string.IsNullOrWhiteSpace(_config.SmtpHost)) - SetupMailLogging(); - var configInvalid = false; if (FsUtils.CheckSpoolingDirectories(_config.IncomingPath, _config.ManagedPath) == false) { Log.Error("ERROR checking spooling directories (incoming / managed)!");