My application should support several logging scenarios that might be either given by environmental settings or user defined flags:
Debug - triggered either by a startup parameter, when a debugger is attached or the built configuration is set to debug. Active appenders: DebugAppender (logs to the attached debugger, if available).
Verbose - triggered by a startup parameter. Active appenders: Default, but appenders should have a more expressive output (string pattern) for additional info
Release - triggered by the RELEASE build configuration. Active appenders: RollingFlatFileAppender, EventLogAppender (since it is a Windows servce)
Console - triggered by a startup parameter. Active appenders: ColoredConsoleAppender
It should be possible to mix certain modes, e.g. Release/Console, Release/Console/Verbose, Debug/Console, Debug/Verbose.
Does log4net support such a dynamic configuration? It tried with serving different log4net-config files using pre-build actions, however this only works for RELEASE and DEBUG build configurations, not including the startup parameters. Or are there any other logging framework which might support such scenarios the easy way? (e.g. not altering app.config at runtime which is just a PITA)