logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herrmann, David G" <david.g.herrm...@intel.com>
Subject log4net advice
Date Wed, 02 Nov 2011 21:03:50 GMT
To: Someone more knowledgeable in log4net than myself.

I have just downloaded the 1.2.11 version of log4net. I am learning how to =
use it and can get basic logging done in my application. However, I have a =
need for something that I'm not sure how to do if it is possible at all.

I need to be able to log to different log files within the same application=
 where I don't know the log file names in advance so I cannot create the ne=
cessary appenders in my app.config file before hand. I will only know the l=
og file name at run time. Is there a way I can do this? Can I use one appen=
der that is defined in my app.config file but substitute a different file n=
ame at run time somehow? Or is there a way to set up my logger using just t=
he log4net API?

I see that log4net comes with an extensive API but if this is possible I do=
n't see it in the API. If I can specify log file names at run time, how wou=
ld I do that?

Thank you very much for any advice on this.

-Dave Herrmann


Mime
View raw message