You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Klaus21 <kl...@gmx.de> on 2007/11/14 11:14:02 UTC

Tomcat5.5 roll over standard output daily

Hi All,

does anyone know if it is possible to tell Tomcat5.5 to roll over the
C:\Tomca5.5\logs\stdout.[Date].log file every day without to restart the
server ? 
I'm found a sample logging.properties file in the internet and modified it.
So i can roll over the localhost.[Date].log every day at 0.00 in another
directory. 


## define 5localhost file handler - all logging done via 'localhost' logger
## will go to localhost.<dateStamp>.txt file
5localhost.org.apache.juli.FileHandler.level = FINE
5localhost.org.apache.juli.FileHandler.directory = D:/TomcatLOG
5localhost.org.apache.juli.FileHandler.prefix = localhost.

I cant figure it out how to do the same with the stdout file under
C:\Tomcat5.5\logs !?
Only if i restart Tomcat i will get a new stdout[Date].log file with the
current date.

Any help would be appreciated 

Klaus
-- 
View this message in context: http://www.nabble.com/Tomcat5.5-roll-over-standard-output-daily-tf4803871.html#a13743472
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat5.5 roll over standard output daily

Posted by David Smith <dn...@cornell.edu>.
stdout.log is the redirected standard output of tomcat.  Rollover isn't 
possible because it's outside of tomcat.  I believe if you google for 
tomat swallow output, you'll get info on making most of standard output 
hit tomcat's internal logging mechanism.

--David

Klaus21 wrote:

>Hi All,
>
>does anyone know if it is possible to tell Tomcat5.5 to roll over the
>C:\Tomca5.5\logs\stdout.[Date].log file every day without to restart the
>server ? 
>I'm found a sample logging.properties file in the internet and modified it.
>So i can roll over the localhost.[Date].log every day at 0.00 in another
>directory. 
>
>
>## define 5localhost file handler - all logging done via 'localhost' logger
>## will go to localhost.<dateStamp>.txt file
>5localhost.org.apache.juli.FileHandler.level = FINE
>5localhost.org.apache.juli.FileHandler.directory = D:/TomcatLOG
>5localhost.org.apache.juli.FileHandler.prefix = localhost.
>
>I cant figure it out how to do the same with the stdout file under
>C:\Tomcat5.5\logs !?
>Only if i restart Tomcat i will get a new stdout[Date].log file with the
>current date.
>
>Any help would be appreciated 
>
>Klaus
>  
>


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


Re: Tomcat5.5 roll over standard output daily

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lionel,

Lionel Crine wrote:
> 1- Using logrotate (assuming you're on linux)
> [snip]
> 3- using the crontab (assuming you're on linux)

Note that Linux isn't the only OS with these tools. It's just the latest
one to have them. ;)

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHO7RU9CaO5/Lv0PARApmLAJ0W1ab+1QRDZQSHjJU7z8AsEh3TEwCdG/Eo
/rIIKY3oRvd1wJVgRgzgKwc=
=+5R1
-----END PGP SIGNATURE-----

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


Re: Tomcat5.5 roll over standard output daily

Posted by Lionel Crine <lc...@linagora.com>.
Hi,

David is right.

You have to handle this file some other ways :
1- Using logrotate (assuming you're on linux)
2- Pipe the file to cronolog, rotatelogs, ...
3- using the crontab (assuming you're on linux)

The second solution may be dangerous because cronolog or rotatelogs open 
  some descriptors and so you can not restart tomcat from ssh command 
from another computer.

Lionel

Klaus21 wrote:
> Hi All,
> 
> does anyone know if it is possible to tell Tomcat5.5 to roll over the
> C:\Tomca5.5\logs\stdout.[Date].log file every day without to restart the
> server ? 
> I'm found a sample logging.properties file in the internet and modified it.
> So i can roll over the localhost.[Date].log every day at 0.00 in another
> directory. 
> 
> 
> ## define 5localhost file handler - all logging done via 'localhost' logger
> ## will go to localhost.<dateStamp>.txt file
> 5localhost.org.apache.juli.FileHandler.level = FINE
> 5localhost.org.apache.juli.FileHandler.directory = D:/TomcatLOG
> 5localhost.org.apache.juli.FileHandler.prefix = localhost.
> 
> I cant figure it out how to do the same with the stdout file under
> C:\Tomcat5.5\logs !?
> Only if i restart Tomcat i will get a new stdout[Date].log file with the
> current date.
> 
> Any help would be appreciated 
> 
> Klaus

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