Ceki, this is wierd.  I just discovered this "feature" myself, trying to
figure out why my stand alone apps were not initializing properly and not
printing debug messages.  I was thinking of lobbying the commons-logging
group to allow an initializer class be specified so you could write your own
initialization code.

But, I am trying to figure out why, when running in stand alone mode, the
default log4j initialization does not seem to work.  So, until I figure that
out, I'm going to keep quiet.

-Mark

> -----Original Message-----
> From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 17, 2003 3:20 PM
> To: Log4J Users List
> Subject: Re: all log entries being copied to catalina_out.log
> 
> 
> 
> Here is the story.
> 
> The commons-logging API, when it decides that you want to use log4j,
> takes the liberty of configuring a ConsoleAppender (on System.Err) and
> attaching it to the root logger. The PattenLayout uses the pattern "%r
> [%t] %p %c{2} %x - %m%n". See the code of
> o.a.c.l.impl.Log4JCategoryLog.java for more details.
> 
> Since tomcat redirects System.out to catalina.out, we observe what we
> observe... Mystery solved.
> 
> At 20:16 17.01.2003 +0100, you wrote:
> >At 11:06 17.01.2003 -0800, you wrote:
> >
> >>There are so many places to look trying to track this down involving
> >>tomcat and commons-logging, so I don't quite know exactly 
> what to ask of
> >>this list.  I don't think there are any competing 
> configurations, so I
> >>don't think a different appender with an alternate pattern 
> that is doing
> >>the catalina_out.log entries.  Is there some configuration 
> in log4j that
> >>would lead to duplicating every log entry for every 
> appender to standard
> >>out with the time pattern shown above?
> >
> >I am personally facing the same problem with 
> struts1.1b2+tomcat4.1.12.
> >Tomcat-user@ list is probably the place place to ask this question.
> >
> >>john mcnally
> >
> >--
> >Ceki
> 
> --
> Ceki
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to