I am using log4net to log my microservices application. I have created a nuget package to house some reusable code.
This is my logging declaration in all my classes.
protected static readonly ILog Log = LogManager
.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
Obviously, when I use this declaration inside my nuget package, it creates a log4net logger of my nuget package type. I lose context of which microservice I am in.
Can I get a logger that reflects the calling method? Or ideally, as well as the nuget package class?