Skip to content

Instantly share code, notes, and snippets.

@dbuksbaum
Created August 21, 2010 19:41
Show Gist options
  • Select an option

  • Save dbuksbaum/542759 to your computer and use it in GitHub Desktop.

Select an option

Save dbuksbaum/542759 to your computer and use it in GitHub Desktop.
Simple debug logger to use in Calibrun.Micro
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