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

Example of a wrapper method using string formatting parameters.

This can probably safely be removed once the logging has stabilized and
is tested in production.

Refers to #3
parent 1639bfdb
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,18 @@ namespace AutoTx
return text;
}
/// <summary>
/// Wrapper method to send an email and log a message using a format string.
///
/// TODO: Once logging has stabilized we can probably safely remove this method again!
/// </summary>
public void AdminDebugLog(string subject, string format, params object[] list) {
var msg = string.Format(format, list);
SendAdminEmail(msg, subject);
msg = subject + "\n" + msg;
Log.Error(msg);
}
/// <summary>
/// Send a notification email to the AdminEmailAdress.
/// </summary>
......
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