You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Gregor Schneider <rc...@googlemail.com> on 2007/06/11 08:27:28 UTC
Named loggers in servletcontainers static?
Hi,
just a simple question:
When I create an own log4j.xml for different webapps (here in tomcat)
and specify the rootlogger i.e. in
$catalina_home/common/classes/log4j.xml and in any log4j.xml of a
certain webapp - it's still the same root-logger since it is astatic
one, right?
Does the same also go for other namebased loggers like "MyLogger"?
Meaning, if I have two different webapps, and for each I'm creating a
logger named "MyLogger" - is it the same one (static) ?
TIA
Gregor
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Named loggers in servletcontainers static?
Posted by James Stauffer <st...@gmail.com>.
Basically (assuming you aren't using a repository) selector it will be
the same logger if the classloader is the same. And it will be the
same classloader if you place log4j.jar only in common/lib. If you
have WEB-INF/lib/log4j.jar then that app will have a "private" version
of log4j.
Yes the root loggers work the same way as specific loggers (but
com.prog1.MyLogger would be different than com.prog2.MyLogger).
(I know I am simplifying things so someone may jump in an clarify but
it should be basically correct.)
On 6/11/07, Gregor Schneider <rc...@googlemail.com> wrote:
> Hi,
>
> just a simple question:
>
> When I create an own log4j.xml for different webapps (here in tomcat)
> and specify the rootlogger i.e. in
> $catalina_home/common/classes/log4j.xml and in any log4j.xml of a
> certain webapp - it's still the same root-logger since it is astatic
> one, right?
>
> Does the same also go for other namebased loggers like "MyLogger"?
> Meaning, if I have two different webapps, and for each I'm creating a
> logger named "MyLogger" - is it the same one (static) ?
>
> TIA
>
> Gregor
> --
> what's puzzlin' you, is the nature of my game
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> ---------------------------------------------------------------------
> 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