Skip to content

Instantly share code, notes, and snippets.

@SamLeach
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamLeach/8870396f29c955ad5078 to your computer and use it in GitHub Desktop.
Save SamLeach/8870396f29c955ad5078 to your computer and use it in GitHub Desktop.
log4net log4mongo Logger wrapper
public class Logger : ILogger
{
private readonly ILog log;
public Logger(string type)
{
this.log = LogManager.GetLogger(type);
}
public void Debug(object message)
{
this.log.Debug(message);
}
public void Debug(object message, Exception exception)
{
this.log.Debug(message, exception);
}
public void Error(object message)
{
this.log.Error(message);
}
public void Error(object message, Exception exception)
{
this.log.Error(message, exception);
}
public void Fatal(object message)
{
this.log.Fatal(message);
}
public void Fatal(object message, Exception exception)
{
this.log.Fatal(message, exception);
}
public void Info(object message)
{
this.log.Info(message);
}
public void Info(object message, Exception exception)
{
this.log.Info(message, exception);
}
public void Warn(object message)
{
this.log.Warn(message);
}
public void Warn(object message, Exception exception)
{
this.log.Warn(message, exception);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment