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 rampelnik69 <ra...@seznam.cz> on 2009/02/04 09:54:40 UTC

Re: using a specific log file for a specific classes



Pierre LHUSSIEZ wrote:
> 
> Hi,
> 
> coul You help Me, please, how use specific log for MORE CLASSES ??? (no
> one class only)
> 
> does log4net provide this feature?
> 
> thanks.
> 
> -- 
> Pierre LHUSSIEZ
> 
> 

-- 
View this message in context: http://www.nabble.com/using-a-specific-log-file-for-a-specific-class-tp15139211p21826555.html
Sent from the Log4net - Users mailing list archive at Nabble.com.


Re: using a specific log file for a specific classes

Posted by Freddy Gómez <gc...@gmail.com>.
This is an option I know,
If the classes share the same namespace you can define a logger with the
value of the namespace then all the classes will use that logger.

for example: let's say you have the namespace 'mynamespace' and you have the
clases
'mynamespace.myclass1', 'mynamespace.myclass2' y 'mynamespace.myclass3'.
Then if you define a logger with name
loggername = 'mynamespace' you will have the three classes sharing the same
logger.

Check out the documentation of the filters you may find them useful.

-fred


On Wed, Feb 4, 2009 at 4:24 AM, rampelnik69 <ra...@seznam.cz> wrote:

>
>
>
> Pierre LHUSSIEZ wrote:
> >
> > Hi,
> >
> > coul You help Me, please, how use specific log for MORE CLASSES ??? (no
> > one class only)
> >
> > does log4net provide this feature?
> >
> > thanks.
> >
> > --
> > Pierre LHUSSIEZ
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/using-a-specific-log-file-for-a-specific-class-tp15139211p21826555.html
> Sent from the Log4net - Users mailing list archive at Nabble.com.
>
>