log4net question

Deeko

Lifer
Jun 16, 2000
30,213
12
81
If anyone could point me in the right direction here, that'd be great.

I've got a web application with a central log, written using log4net. Custom web parts can be written for this application - and we want to have log information from those web parts to be recorded in both the main log, as well as a separate log specific to that web part.

The easy way to do this is to manually create a rolling file appender with the web part, separate from the main logger, and just write twice, once to the main log, once to the custom. However, this doesn't seem very elegant - is there a way to dynamically add this new logger without changing the configuration file?

Thanks