Create a gist now

Instantly share code, notes, and snippets.

@SamLeach /Logger.cs
Last active Aug 29, 2015

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