tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric B." <>
Subject Re: Log4j vs JULI configuration discrepancy
Date Wed, 12 Aug 2009 14:53:08 GMT
"Caldarale, Charles R" <> wrote in message
>> I don't understand why when using Juli anything that webapp's log4j
>> logs to Stdout gets logged to a file, however, when using log4j with
>> tomcat this behaviour isn't replicated.

> Note that catalina.out isn't actually being logged to; the Tomcat startup
> script simply redirects stdout and stderr to this file.
> I don't know what happens to System.out and System.err when log4j is in
> the game.

> Are you using swallowOutput in your <Context> element?

No.  Am actually a little confused by the docs on the swallowOutput param. 
>From what I would understand from the param name by iteslf, it would imply 
that std output from the context is ignored/swallowed.  But from reading the 
docs, it says:   "If the value of this flag is true, the bytes output to 
System.out and System.err by the web application will be redirected to the 
web application logger."  Which makes me think that if it is true, the the 
web logger is used to log the output?

Just to be safe, I added it in an tried to turn it to true and false.  False 
made no difference at all (as expected since it is the default setting). 
Setting it to true caused no log files to be genereated at all.  Really 
strange....  even more confusing.

Anyone have any ideas why the java logger and log4j would work differently
when trying to log the root loggers?  On a similar note, is there a way in
that case to log anything a context logs to stdout to individual files?

The goal would be to have all stdout from context1 logged to context1.log,
anything from context b to contextb.log, etc...



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message