I want to build my log4net logger in my MVC controller abstract base class like so:
protected static readonly ILog Log = LogManager.GetLogger(typeof(AuthorizedController));
In this manner I can define the logger once and be done with it. The only problem is that the logger attribute in the log output will always be AuthorizedController
, and if I have FooController
inherited from AuthorizedController
I'd like the log output to reflect that.
What would be a good KISS, DRY, and efficient way do doing this?