Skip to content
Snippets Groups Projects
Commit 225926c0 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Re-order to improve readability.

Refers to #3
parent 9185de32
No related branches found
No related tags found
No related merge requests found
...@@ -115,22 +115,22 @@ namespace AutoTx ...@@ -115,22 +115,22 @@ namespace AutoTx
var logConfig = LogManager.Configuration; var logConfig = LogManager.Configuration;
var mailTargetFatal = new MailTarget { var mailTargetFatal = new MailTarget {
Name = "mailfatal",
SmtpServer = _config.SmtpHost, SmtpServer = _config.SmtpHost,
SmtpPort = _config.SmtpPort, SmtpPort = _config.SmtpPort,
From = _config.EmailFrom, From = _config.EmailFrom,
To = _config.AdminEmailAdress, To = _config.AdminEmailAdress,
Name = "mailfatal",
}; };
logConfig.AddTarget(mailTargetFatal); logConfig.AddTarget(mailTargetFatal);
logConfig.AddRuleForOneLevel(LogLevel.Fatal, mailTargetFatal); logConfig.AddRuleForOneLevel(LogLevel.Fatal, mailTargetFatal);
if (!string.IsNullOrWhiteSpace(_config.AdminDebugEmailAdress)) { if (!string.IsNullOrWhiteSpace(_config.AdminDebugEmailAdress)) {
var mailTargetError = new MailTarget { var mailTargetError = new MailTarget {
Name = "mailerror",
SmtpServer = _config.SmtpHost, SmtpServer = _config.SmtpHost,
SmtpPort = _config.SmtpPort, SmtpPort = _config.SmtpPort,
From = _config.EmailFrom, From = _config.EmailFrom,
To = _config.AdminDebugEmailAdress, To = _config.AdminDebugEmailAdress,
Name = "mailerror",
}; };
logConfig.AddTarget(mailTargetError); logConfig.AddTarget(mailTargetError);
logConfig.AddRuleForOneLevel(LogLevel.Error, mailTargetError); logConfig.AddRuleForOneLevel(LogLevel.Error, mailTargetError);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment