Is there a way to get the config properties in LOG4NET without defining a property for each name-value property. I am just curious to know if there is a开发者_如何学编程ny method which could return dictionary of config properties?
I do not see how to achieve this: Log4net parses the configuration file and the sets the properties of the appenders. The appender never gets hold of the configuration.
If you are willing to change log4net you could change this behavior: Build a dictionary while parsing the configuration and call a method on the appender that accepts this dictionary.... but unless you need dynamic options this is probably not worth the effort.
精彩评论