Hi - we don't use log4net for our logging - and I've had some trouble removing it as a dependency. In order to get around it I've had to:
- Add a new member to the LogginMode enum:
/// Uses the root logger as held by the LogUtil.GetRootLogger static property
- Then in the AppServerBase I've modified GetLogger as follows:
private void SetupLogger()
Logger = LogUtil.GetRootLogger();
Logger = new DynamicLog4NetLogger(Config.Name);
Logger = new ConsoleLogger(Config.Name);
Logger = new Log4NetLogger(Config.Name);
This allows us to inject our own logger using the LogUtil.Setup command. Without the above changes, the logger is ignored. Please consider implementing this change in the main code base.
Please also consider abstracting out the log4net loggers into their own assembly - therefore removing it as a dependency and fully using the abstraction you have already put in place.