I'm using ServiceStack for some time and had a setup with some basic logging using ServiceStack.Logging package. It works well to log the exceptions that go up the call stack.
In some cases I may need to log an event further on the stack. My structure is something like this:
- ServiceInterface - containing the services
- ServiceModel - containing the DTOs
- BLL - the logic layer (I need to log something here)
I have also a ServiceBase that setup the logging interface as following:
public abstract class MyServiceBase : Service
{
public ILog log = LogManager.GetLogger(typeof(MyServiceBase));
}
What is the best approach to log information inside this BLL layer?
Currently, I only see the option of passing the ILog
instance to the BLL class and use it down there.
Is there any other option?
Thanks!