tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Davies" <juliusdav...@cucbc.com>
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 "catalina.sh run" command instead of "startup.sh"
or "catalina.sh start" and redirect it.  Like so:

catalina.sh 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.

yours,

Julius


-----Original Message-----
From:	Benoit - Althosting.fr [mailto:benoit@althosting.fr]
Sent:	Thu 1/6/2005 3:54 PM
To:	tomcat-user@jakarta.apache.org
Cc:	
Subject:	catalina.out export to another file
Hi,

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="mywebsite.com" debug="0"
appBase="/usr/local/jakarta-tomcat4.1/webapps/montest" unpackWARs="true"
autoDeploy="true">
   <Context path="" docBase="" debug="1" reloadable="true"
swallowOutput="true" />
   <Logger className="org.apache.catalina.logger.SystemOutLogger"
directory="/usr/local/jakarta-tomcat4.1/webapps/montest/logs"
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"/>
</Host>

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

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message