See my answer to this question for one example of how to write a wrapper for NLog:
Nlog Callsite is wrong when wrapper is used
To save time, I have copied the code here:
class NLogLogger : ILogger
{
private NLog.Logger logger;
//The Type that is passed in is ultimately the type of the current object that
//Ninject is creating. In the case of my example, it is Class1 and Class1 is
//dependent on ILogger.
public NLogLogger(Type t)
{
logger = NLog.LogManager.GetLogger(t.FullName);
}
//Trace, Warn, Error, Fatal eliminated for brevity
public bool IsInfoEnabled { get { return logger.IsInfoEnabled; } }
public bool IsDebugEnabled { get { return logger.IsDebugEnabled; } }
public void Info(string format, params object [] args)
{
if (logger.IsInfoEnabled)
{
Write(LogLevel.Info, format, args);
}
}
public void Debug(string format, params object [] args)
{
if (logger.IsDebugEnabled)
{
Write(LogLevel.Debug, format, args);
}
}
private void Write(LogLevel level, string format, params object [] args)
{
LogEventInfo le = new LogEventInfo(level, logger.Name, null, format, args);
logger.Log(typeof(NLogLogger), le);
}
}
This example was written specifically for the context of the question, which was about wrapping NLog for use with NInject.
Go to the link to get a little bit more explanation about why this works and why more naive approaches don't work.
Also, see this link for examples (from the NLog developer) of how to wrap NLog:
https://github.com/jkowalski/NLog/tree/master/examples/ExtendingLoggers
Finally, consider using Common.Logging for .NET as a logging abstraction or as an example of how to write a logging abstraction.