I just did some more tests.
What happens is:
- Whatever you put in your app log4j property files is what will go to
the catalina.out. There is no such thing as getting a catalina.out
clean.
- You can have a rotateable tomcat.log. But that will be deplicated
from what is already in catalina.out

Please correct me if I'm wrong.

2008/10/20 emerson cargnin <[EMAIL PROTECTED]>:
> Again the issue of the logs.
>
> According to:
> http://tomcat.apache.org/tomcat-5.5-doc/logging.html
>
> 1) I add log4j-1.2.15.jar and commons-logging-1.1.1.jar inside my common/lib
> 2) I create a log4j.properties inside common/classes with the following 
> content:
>
>  log4j.rootLogger=ERROR, R
>  log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
>  log4j.appender.R.DatePattern='.'yyyy-MM-dd
>  log4j.appender.R.File=/dev/servers/apache-tomcat-5.5.26_fe/tomcat.log
>  log4j.appender.R.layout=org.apache.log4j.PatternLayout
>  log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
>
>
> Result:
>
> 1) a rotateable tomcat.log should be created, containing only error logs
> 2) catalina.out would have all log4j messages, which would be
> redirected to tomcat.log
>
> Well, it doesn't actually happen.
>
> - The tomcat.log is actually created, but it still contains all of
> debug/info messages.
> - catalina.out still has all log4j messages.
>
>
> Could someone confirm what is the right behaviour?
>
> regards
> Emerson
>
> 2008/8/21 emerson cargnin <[EMAIL PROTECTED]>:
>> Which are the views of other people in the list?
>>
>>
>> On 21/08/2008, emerson cargnin <[EMAIL PROTECTED]> wrote:
>>> Kees
>>>
>>> That one is another log file, configured at logging.properties:
>>> 1catalina.org.apache.juli.FileHandler.level = INFO
>>> 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
>>> 1catalina.org.apache.juli.FileHandler.prefix = catalina.
>>>
>>> On 20/08/2008, Kees Jan Koster <[EMAIL PROTECTED]> wrote:
>>> > Dear Emerson,
>>> >
>>> > >
>>> > > > Truncating? It should be a rolling file, rolling over daily. You can
>>> > just
>>> > > > remove the old versions. Is this a stock tomcat, one from the ports, 
>>> > > > or
>>> > > > maybe a particularly old one?
>>> > > >
>>> > > >
>>> > >
>>> > > catalina.out is set at the catalina.sh:
>>> > >
>>> > >
>>> > > >
>>> > > > > "$CATALINA_BASE"/logs/catalina.out 2>&1 &
>>> > > > >
>>> > > >
>>> > >
>>> > > This file is not rateable, as it is jsut a redirection.
>>> > >
>>> >
>>> > You are right. Woops, I thought it was a rotatable file. Maybe I restart 
>>> > my
>>> > Tomcats too often. :)
>>> >
>>> > > We are thinking in moving this redirection to  /dev/null or just
>>> > > remove the redirection.
>>> > > Is it a sense thing to do?
>>> > >
>>> >
>>> > To get rid of an ever-growing file, yes. However, you have to make really
>>> > sure that you still get all the stack traces and whatnot that is in that
>>> > file, only get them into a rolling file.
>>> >
>>> > Ahhhh. Wait. Now I know why I never run into this. I run my Tomcats in
>>> > screen using "catalina.sh run", so catalina.out is written to the console
>>> > instead of a file. I do get a nice daily log e.g. catalina.2008-08-20.log.
>>> >
>>> > That would mean it is safe to redirect catalina.out to /dev/null, as long 
>>> > as
>>> > you have the daily logs.
>>> >
>>> >
>>> > --
>>> > Kees Jan
>>> >
>>> > http://java-monitor.com/forum/
>>> > [EMAIL PROTECTED]
>>> > 06-51838192
>>> >
>>> > Human beings make life so interesting. Do you know that in a universe so
>>> > full of wonders,
>>> > they have managed to invent boredom. Quite astonishing... -- Terry 
>>> > Partchett
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To start a new topic, e-mail: users@tomcat.apache.org
>>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> >
>>> >
>>>
>>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to