Well actually I am using Log4j (under the covers) I think.  I am 
using the <log> JSP tags, and they have log4j as a pre-req.  But
obviously somehow the default config for log4j is writing to 
stdout rather than a log file.  

The default log4j.properties file that ships with the log tags is:-

<<<<<<<<<<<<<<<<

# Sample properties to initialise log4j
#log4j.rootCategory=debug, stdout, R
log4j.rootCategory=debug, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=logtags.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=2

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

<<<<<<<<<<<<<<<<

Obviously I need to modify this to get it to put the output
somewhere else and to rotate it.  But reading the log4j manual
on the apache site I am not sure I know what I need to modify.

TIA

David

On Friday 03 September 2004 13:55, Andrew Janian wrote:
> Here is a couple links that should explain the lack of rotation of
> catalina.out:
>
> 1) http://jakarta.apache.org/tomcat/faq/misc.html#catalina.out
>
>       This one is from the tomcat website and is just the question you are
> asking.  It says that you should not be using stdout (System.out.println)
> because you should be using a logging package like log4j (good
> recommendation).
>
> 2) http://marc.theaimsgroup.com/?t=105544472600001&r=1&w=2
>
>       As reference by the above link, this one is a thread about rotating
> catalina.out.
>
> Hope this helps,
>
> Andrew Janian
>
> -----Original Message-----
> From: David Goodenough [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 03, 2004 7:49 AM
> To: [EMAIL PROTECTED]
> Subject: Rotation of Catalina.out
>
>
> I am running Tomcat 5.0.27 on a Debian Unstable system
> in /usr/local/share/tomcat5.  Under this directory is the logs directory
> and that contains lots of localhost_log.yyyy-mm-dd.txt files (one for
> each day) but only one catalina.out file.
>
> In server.xml there are two Logger tags:-
>
>       <!-- Global logger unless overridden at lower levels -->
>       <Logger className="org.apache.catalina.logger.FileLogger"
>               prefix="catalina_log." suffix=".txt"
>               timestamp="true"/>
>
>         <Logger className="org.apache.catalina.logger.FileLogger"
>                  directory="logs"  prefix="localhost_log." suffix=".txt"
>             timestamp="true"/>
>
> and I guess that the latter is responsible for all the daily logs.
>
> The former however is obviously not responsible for the
> catalina.out as the file name is wrong.
>
> So I assume that Catalina.out is coming from
> StandardErrLogger and/or StandardOutLogger.
>
> My question is how to get daily files for Catalina.out?
>
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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

Reply via email to