I have a class something like this:
public class ABCHelper : ABCBase, IABCHelper
{
public ABCHelper()
: base(LogManager.GetCurrentClassLogger())
{
}
}
public class ABCBase : IABCBase
{
protected readonly Logger logger;
protected ABCBase(Logger logger)
{
this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
public async Task<HttpResponseMessage> MakeAsyncCall(HttpRequestMessage request)
{
// some code
this.logger.Info("some string");
}
}
Class registration in Unity:
container.RegisterType<IABCHelper, ABCHelper>();
When I call MakeAsyncCall in some code flow, NLog logs the classname as "DynamicBuildPlanGenerationContext".
I was expecting "ABCHelper" instead of "DynamicBuildPlanGenerationContext".
What am I missing?