-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dan,
On 5/15/12 12:41 PM, Daniel Mikusa wrote: > ----- Original Message ----- >> Chris, >> >> Thank you so much for the suggestions. >> >> It's a tomcat on windows so some options of logs or files >> rotation available on Li/Unix won't work. I tried to write >> script to rotate but failed b/c as you said, I can't move log >> files while tomcat is running. Neither Log4j. > > Are you running Tomcat as a Windows Service? If so, you'll be > using a wrapper script. The wrapper script should allow you to > rotate the stdout / stderr log file. What wrapper script are you > using? This prompted to actually *look* at commons-demon and it looks like there is some support: https://issues.apache.org/jira/browse/DAEMON-95 If you issue a SIGUSR1 to the process, it will re-open the output files. I suspect that you could do something like this to rotate: > STAMP=[obtain timestamp] ren catalina.out catalina.out.%STAMP% > pskill SIGUSR1 %CATALINA_PID% You can get 'pskill' from Sysinternals, but I'm not sure if it will work. This is obviously a very *NIX-oriented feature. I would head-on over to the commons list and ask about log rotation suggestions on win32. That is, if you are using Tomcat's service launcher. You probably should be, honestly. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+yjo4ACgkQ9CaO5/Lv0PCbqQCfTlovQW06feOq9nNaosg9dUkv bWEAoIoFqUed8lPHrrXcE9BCoN7nGO1z =xFEl -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org