logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Stauffer" <stauffer.ja...@gmail.com>
Subject Re: log4j conversion specifiers and logger names
Date Wed, 29 Nov 2006 19:57:53 GMT
The logger name is the new name for "category" so %c will give the logger name.

On 11/29/06, maskkkk <leeand00@hotmail.com> wrote:
>
> Lets say I'm in an application and I want to specify a in a class logger such
> as follows:
>
>
>
> > ...
> > Logger log = Logger.getLogger("UseCase1");
> > ...
> >
>
> Now lets suppose I want "UseCase1" to be displayed in the resulting log file
> next to the log statements from the "UseCase1" logger.  Is there any way to
> do this using a conversion specifier in log4j.xml?
>
>
>
> >                <layout class="org.apache.log4j.PatternLayout">
> >                       <param name="ConversionPattern"
> >
> > value="[[[[%someConversionSpecifierWhichResultsInUseCaseAsLoggerName]]]]
> > - %m%n"/>
> >          </layout>
> >
>
> Thank you,
>
>      Andrew J. Leer
>
> --
> View this message in context: http://www.nabble.com/log4j-conversion-specifiers-and-logger-names-tf2727234.html#a7606069
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message