diff --git a/AutoTx/Email.cs b/AutoTx/Email.cs index 554a5fdd9c79833d61d1aac9522f32f2f23d0e0a..d678364a15c903a78d930779b7361b8adc0e0daf 100644 --- a/AutoTx/Email.cs +++ b/AutoTx/Email.cs @@ -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>