Hi, I'm working on setting up log4net in a multi-tiered application. I have most of my logging set up as desired, but now I'm trying to get the entries in .config set up in a way to allow maximum flexibility on the levels being output.
My logger naming convention goes something like:
ExecutableName.WorkerThreadName.[ExternalModuleName(s)].ClassName
My current logger definition section in the .config file looks something like:
<root>
<level value="DEBUG" />
<appender-ref ref="MyAppender" />
</root>
<logger name = "ExecutableName">
<level value="FATAL" />
</logger>
<logger name = "ExecutableName.WorkerThreadName">
<level value="OFF" />
</logger>
<logger name = "ExecutableName.WorkerThreadName.ClassName">
<level value="INFO" />
</logger>
<!--repeat as necessary--->
Hopefully you get the idea... It seem like this has the potential to explode in to a mess of hard to maintain entries (especially when the app reaches a support phase). Any suggestions on how to best manage the level definitions for the nested loggers? I've played around a bit with actually nesting the xml statements, but that doesn't seem to work.
Thanks in advance,
Dan