tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: How to split the default stdout log?
Date Tue, 06 Jul 2010 08:13:19 GMT
郑翼羽 wrote:
> Hello everyone,
> 
> I am using Tomcat 5.5.28 in Windows systems. Because there are lots of codes
> like "System.out.println(" some info here")" in the apps, after a few days
> the file  "stdout_*.log" in the "/logs" folder becomes so large that we
> cannot open it. Due to some reasons, I cannot modify the codes, so the only
> solution is to make the log generated everyday.
> 
> I have tried the log4j, but I cannot redirect the stand output to the log
> files. Only there log infos that send out by logging class can be recorded
> in the logs generated by log4j.
> 
> Anyone know a simple solution to meet my needs?
> 
Hi.
You do not say, but I presume that you are running Tomcat 5.5 as a Windows Service.
If so, then Tomcat (or rather the JVM which runs Tomcat), is running inside of a "wrapper"

program called "tomcat5.exe" (tomcat_dir/bin/tomcat5.exe).
This program "catches" the stdout/stderr of the JVM, and redirects them to files.
To which files it redirects them, is stored in the Windows Registry.
When tomcat5.exe starts, it reads a series of parameters from the Registry, and then 
starts the JVM (and Tomcat) using these parameters.

There is another program in tomcat_dir/bin, called "tomcat5w.exe".
This is a GUI which enables you to change these Registry parameters used by tomcat5.exe.
Double-click on the tomcat5w.exe program, and navigate to the "Logging" tab.

Maybe this gives you an idea.

For a complete explanation, start here : http://commons.apache.org/daemon/
tomcat5.exe is really a renamed prunsrv
tomcat5w.exe is really a renamed prunmgr


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


Mime
View raw message