tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Davies" <>
Subject RE: catalina.out export to another file
Date Fri, 07 Jan 2005 07:53:24 GMT
Hi, Benoit,

You can could try adding code like this to a jsp, and then hitting the jsp with a browser:

OutputStream os = new FileOutputStream( "/var/log/myNewLogFile.log" );
PrintStream ps = new PrintStream( os );
System.setOut( os );

>From that point on you will have taken over "catalina.out".

Also, when starting Tomcat, you could use " run" command instead of ""
or " start" and redirect it.  Like so: run > /var/log/myNewLogFile.log

These are just two workarounds I happen to know about.  Probably there are betters ways using
Tomcat's config files.



-----Original Message-----
From:	Benoit - []
Sent:	Thu 1/6/2005 3:54 PM
Subject:	catalina.out export to another file

Sorry, I post this message again, I have no answer and I really need help :(

I'm trying to redirect catalina logs to another file
(montest_access_log.txt) but catalina out is not redirect in my file (steal
in catalina.out)

That's my configuration in server.xml for the host :

<Host name="" debug="0"
appBase="/usr/local/jakarta-tomcat4.1/webapps/montest" unpackWARs="true"
   <Context path="" docBase="" debug="1" reloadable="true"
swallowOutput="true" />
   <Logger className="org.apache.catalina.logger.SystemOutLogger"
prefix="montest" suffix=".txt"  timestamp="true" verbosity="4" />
   <Logger className="org.apache.catalina.logger.SystemErrLogger"
directory="logs" prefix="montest_systerr" suffix=".txt"  timestamp="true"
verbosity="4" />
   <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="webapps/montest/logs"  prefix="montest_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>

Does anybody know anything about this ?
I tried to make the change but unfortynately it does not work.


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

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

View raw message