tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "改变自己" <1287567...@qq.com>
Subject 回复: tomcat 5 logs
Date Thu, 20 Mar 2014 04:30:53 GMT
the source of my problem  is that in the application ,we just used many system.out sentence
as  a log output instead of using log4j,  because it is really a old applicaiton ;
now we need to capture the the system.out information as a log;


your answer :
On Windows... I'm not sure what options are available for rotating the
stdout file. On *NIX, if you use jsvc, you can move the existing file
and then send a signal to the jsvc process which will close and
re-open the old file. Perhaps that can be done on Windows, but you can
no longer use startup.bat to launch Tomcat: you'll have to use a
Windows Service instead. 




I know very less about *nix system.
so I really can not understand the approach ;
would you please be more specific?


thank you


------------------ 原始邮件 ------------------
发件人: "Christopher Schultz";<chris@christopherschultz.net>;
发送时间: 2014年3月19日(星期三) 晚上9:53
收件人: "Tomcat Users List"<users@tomcat.apache.org>; 

主题: Re: tomcat 5 logs



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

改变自己,

On 3/19/14, 6:03 AM, 改变自己 wrote:
> now my boss let me get the tomcat console information(including
> the startup information and visit information ) and store it in a
> file; at the same time the file must be produced automaticlly every
> day;

Do you mean that you want to get a different file every day for
catalina.out?

> now i configed the startup.bat file which can get the the 
> information i need ,but can not automatically produced a file
> every day;
> 
> here is the configuration : I just changed the: call "%EXECUTABLE%"
> start %CMD_LINE_ARGS%
> 
> to call "%EXECUTABLE%" run %CMD_LINE_ARGS%
> >>..\logs\catalina.%date:~0,10%.out

That will only work if you re-start Tomcat every day, because the
filename is only evaluated when you launch Tomcat. If you want to
restart Tomcat every day, then this will work. If you want to let it
run for a long time (many days), you'll need to do something different.

On Windows... I'm not sure what options are available for rotating the
stdout file. On *NIX, if you use jsvc, you can move the existing file
and then send a signal to the jsvc process which will close and
re-open the old file. Perhaps that can be done on Windows, but you can
no longer use startup.bat to launch Tomcat: you'll have to use a
Windows Service instead.

Let me ask about the source of the problem: are you getting lots and
lots of things logging to stdout / catalina.out? If so, why? There
shouldn't be a lot of stuff going to that log file. Instead, the logs
should be going to an application-specific log file that can be
rotated more easily.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTKaFmAAoJEBzwKT+lPKRYDlcQAIsbzdHgx79hky60+i/KVXs8
Q2m+AJS7sIe31GOxYvecZRjgW3LHA2LVe0kDRk4wVZIjBBqCKpdf6i4cjrEk+WxM
qlSfrCEhpi9r1C0LEG56bnUFeLjKQ050FDKKOPZgx3aokKe6B/aUp4G+YPvqTZTw
YjYEMjz8Xz+dfoOSD3qYXLNxlJJ+SG3kTqEwC2FLuKVHQI6vOLeHZtVeSII6cYhD
veZeSLBqg68MrgGcbF50+s4t5LMVvPC0rwV2RbEPoJzBEaeVklEVrrmBH6BSfPIc
DIFU7Vk1gnYONpGXdf+ZrKQ3NGav1AiEtWGxzoTg4bzGl6N5i/Rt618sOydQfzs+
pptWb1f+7xbrq6ZSzg/3JY4eCM45/PwwLVTc8uF363t4Pk+Mjos6kM6pkhuCZd5C
gLApsqFAtzS1y++0b5jvsCXHVotCkZn9RVcIcNxva0afl0I4ZwM38ASADQIFNheh
iF5v0fy6EaHmvHFAnK4VXhsYC43EPf96QAg2P76U9+64Pbxa6PVqOmR4KTqLvd7r
Hb89Wzc8QfJmW5C5tGEkYrphnQA5iUVq6TnwaOJf+a8c2oplzaB6Grg+i4p6XDlY
ktdVYyr3ggUMKpP7i4swaBXqSuyZyggyooV/eLwXRe0Wadab2gUoNCiG7Qi2fDJc
02ciR5Tw+pUqlG3wBBWZ
=1tir
-----END PGP SIGNATURE-----

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

.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message