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

Some more logging cleanups.

Refers to #3
parent 6f6153e1
No related branches found
No related tags found
No related merge requests found
...@@ -108,7 +108,7 @@ namespace AutoTx ...@@ -108,7 +108,7 @@ namespace AutoTx
body = "Notification from: " + _config.HostAlias body = "Notification from: " + _config.HostAlias
+ " (" + Environment.MachineName + ")\n\n" + " (" + Environment.MachineName + ")\n\n"
+ body; + body;
// writeLog("Sending an admin notification email."); Log.Debug("Sending an admin notification email.");
SendEmail(_config.AdminEmailAdress, subject, body); SendEmail(_config.AdminEmailAdress, subject, body);
_status.LastAdminNotification = DateTime.Now; _status.LastAdminNotification = DateTime.Now;
...@@ -144,10 +144,7 @@ namespace AutoTx ...@@ -144,10 +144,7 @@ namespace AutoTx
SendEmail(_config.AdminEmailAdress, subject, body); SendEmail(_config.AdminEmailAdress, subject, body);
} }
catch (Exception ex) { catch (Exception ex) {
// TODO / FIXME: combine log and admin-email! Log.Error("Error loading email template: {0}", ex.Message);
var msg = string.Format("Error loading email template: {0}", ex.Message);
Log.Error(msg);
SendAdminEmail(msg);
} }
} }
...@@ -183,10 +180,7 @@ namespace AutoTx ...@@ -183,10 +180,7 @@ namespace AutoTx
Log.Debug("Sent transfer completed notification to {0}", userDir); Log.Debug("Sent transfer completed notification to {0}", userDir);
} }
catch (Exception ex) { catch (Exception ex) {
// TODO / FIXME: combine log and admin-email! Log.Error("Error loading email template: {0}", ex.Message);
var msg = string.Format("Error loading email template: {0}", ex.Message);
Log.Error(msg);
SendAdminEmail(msg);
} }
} }
...@@ -214,10 +208,7 @@ namespace AutoTx ...@@ -214,10 +208,7 @@ namespace AutoTx
body); body);
} }
catch (Exception ex) { catch (Exception ex) {
// TODO / FIXME: combine log and admin-email! Log.Error("Error loading email template: {0}", ex.Message);
var msg = string.Format("Error loading email template: {0}", ex.Message);
Log.Error(msg);
SendAdminEmail(msg);
} }
} }
......
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