Last active
August 29, 2015 14:07
-
-
Save SamLeach/8870396f29c955ad5078 to your computer and use it in GitHub Desktop.
log4net log4mongo Logger wrapper
This file contains 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
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