It looks to me like the Castle NLogLogger wrapper that wraps the NLog Logger object is not implemented such the call site information is retained. See this link into the Castle repository for the implementation of the wrapper.
For completeness, here is an abbreviated example of the Castle implementation:
public class NLogLogger : ILogger
{
public NLogLogger(Logger logger, NLogFactory factory)
{
Logger = logger;
Factory = factory;
}
internal NLogLogger() {}
public bool IsDebugEnabled
{
get { return Logger.IsDebugEnabled; }
}
public void Debug(string message)
{
Logger.Debug(message);
}
}
The key problem is that the "Debug" method (all the rest of the logging methods) uses the corresponding methods on the NLog Logger object. The logging methods on the NLog Logger use the calling function/method as the call site (that is not 100% correct, but it is effectively what happens in this case). So, in the case of this wrapper, the call site will be the Castle NLog wrapper implementation. One correct way to write the wrapper such that call site is preserved is the use the Log method on the NLog Logger, passing the Type of the wrapper as the first parameter. NLog will go up the stack until the Type of the MethodInfo is the same as the Type passed into the Log method. The next method up the stack will be the call site.
In order to retain the call site information correctly, the Debug method should look something like this:
public void Debug(string message)
{
LogEventInfo logEvent = new LogEventInfo(LogLevel.Debug, Logger.Name, message);
Logger.Log(typeof(NLogLogger), logEvent);
}
See these links to answers that I have posted in the past about correctly wrapping NLog's Logger such that call site information is retained:
How to retain callsite information when wrapping NLog
Nlog Callsite is wrong when wrapper is used
See also this link to NLog's source repository for some examples of how to extend NLog's Logger.