Created
August 21, 2010 19:41
-
-
Save dbuksbaum/542759 to your computer and use it in GitHub Desktop.
Simple debug logger to use in Calibrun.Micro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal class DebugLogger : Caliburn.Micro.ILog | |
| { | |
| #region Implementation of ILog | |
| public void Info(string format, params object[] args) | |
| { | |
| System.Diagnostics.Debug.Write("[" + DateTime.Now.ToString("o") + "] ", "INFO"); | |
| System.Diagnostics.Debug.WriteLine(format, args); | |
| } | |
| public void Warn(string format, params object[] args) | |
| { | |
| System.Diagnostics.Debug.Write("[" + DateTime.Now.ToString("o") + "] ", "WARN"); | |
| System.Diagnostics.Debug.WriteLine(format, args); | |
| } | |
| public void Error(Exception exception) | |
| { | |
| System.Diagnostics.Debug.Write("[" + DateTime.Now.ToString("o") + "] ", "ERROR"); | |
| System.Diagnostics.Debug.WriteLine(exception.Dump()); | |
| } | |
| #endregion | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment