You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Giacomo Fiorentini <g....@esalab.it> on 2006/07/07 18:08:47 UTC
dispatching log to multiple file based on class
I retry to submit my question:
I need to create or configure existing log4net library so that I'll be able
to have a log file for each class I decide to log.
So briefly: one log-file for each class. Is it possible with log4net ?
If yes how?
For example suppose I have 2 classes:
class C1 {
protected static readonly ILog log = LogManager.GetLogger(typeof(C1 ));
...
log.Debug(".... this write to C2.yyyymmdd.log ....");
}
class C2 {
protected static readonly ILog log = LogManager.GetLogger(typeof(C2 ));
...
log.Debug("... this must write to C2.yyyymmdd.log file ...");
}
Is it possibile with the current release in some way?
If not, where can I start for building this type of logging behaviour ?
More, is it possible to obtain the following log file name pattern?
<full-namespace-class-name>.<yyyymmdd>.log
10x for any help.
Regards.
Giacomo Fiorentini