RE: Limit size of tomcat_out.log?

2004-12-09 Thread Shapira, Yoav

Hi,

Is it possible, and if so how, to limit the size of the tomcat_out.og
file?
I have a development box that is running out of space sometimes because
the
log grows rather large when a lot of users are testing.  Thanks all!

What Tomcat versions are you using?

Tomcat's Loggers (version 5.0 and earlier) automatically rotate, so you
can have a script in place to delete old ones.  For Tomcat 5.5 and
later, you configure the logging via log4j or JDK 1.4 logging, which
both support various options to control/trim file size.

It's not good logging practice to write everything to standard output.
Ig that's what's happening, and that's why it's ending up in tomcat.log,
you should change the apps at some points to use a proper logging
framework like log4j.

Finally, there are tools like cronolog and logrotate which can
rotate/trim this file for you: they're free and easy to use, just Google
for them.

The other approach is holistic: either get more disk space (it's cheap),
configure the logging differently when there are many users, or both.

So there's a bunch of stuff you can and should do.  But Tomcat by itself
doesn't provide much of it for you.  These are routine sysadmin tasks.

Yoav Shapira http://www.yoavshapira.com




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Limit size of tomcat_out.log?

2004-12-09 Thread fzlists
I am on Tomcat 5.0.29.  Can you point me at some documentation on configuring 
it?  I'm not sure about the rotating... is that a configurable option? (I 
assume so).  The log I just looked as was almost 2GB, and I would assume it 
would rotate before them.  But, I have done quite a bit of configuring, so it's 
more than possible I changed the setting.

I know it's not good practice in general, but in our test environment that's 
the way some other folks here want it.  All error and debug info goes to our 
own application-level logs, but a lot of info-type messages show up in the 
Tomcat logs but NOT the app logs, and that's the way they want it (I think just 
to make it a little easier to look at the app log without going through all the 
unimportant messages).  Ah, no sense arguing what's good to do or not, this 
is the way it is in this case.
-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, December 9, 2004 3:03 pm, Shapira, Yoav said:
 
 Hi,
 
Is it possible, and if so how, to limit the size of the tomcat_out.og
 file?
I have a development box that is running out of space sometimes because
 the
log grows rather large when a lot of users are testing.  Thanks all!
 
 What Tomcat versions are you using?
 
 Tomcat's Loggers (version 5.0 and earlier) automatically rotate, so you
 can have a script in place to delete old ones.  For Tomcat 5.5 and
 later, you configure the logging via log4j or JDK 1.4 logging, which
 both support various options to control/trim file size.
 
 It's not good logging practice to write everything to standard output.
 Ig that's what's happening, and that's why it's ending up in tomcat.log,
 you should change the apps at some points to use a proper logging
 framework like log4j.
 
 Finally, there are tools like cronolog and logrotate which can
 rotate/trim this file for you: they're free and easy to use, just Google
 for them.
 
 The other approach is holistic: either get more disk space (it's cheap),
 configure the logging differently when there are many users, or both.
 
 So there's a bunch of stuff you can and should do.  But Tomcat by itself
 doesn't provide much of it for you.  These are routine sysadmin tasks.
 
 Yoav Shapira http://www.yoavshapira.com
 
 
 
 
 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary and/or privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not be saved, copied,
 printed, disclosed or used by anyone else.  If you are not the(an)
 intended recipient, please immediately delete this e-mail from your
 computer system and notify the sender.  Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Limit size of tomcat_out.log?

2004-12-09 Thread Shapira, Yoav

Hi,

I am on Tomcat 5.0.29.  Can you point me at some documentation on
configuring it?

As I said, not much of this is done in Tomcat.  It's not Tomcat's job to
worry about you running out of disk space.

The only Tomcat option relevant to this discussion is swallowOutput,
which is a Context attribute that redirects System.out calls for that
webapp from catalina.out to the Logger configured for that Context, if
any.  The Logger is automatically rotated nightly, but its size is not
limited in any way.

You can plug in a logger that has a size ceiling if you want: Loggers
are easy to implement.  Or you can use a 3rd party program as I
mentioned, like cronolog or logrotate, to do this for you.

Yoav Shapira http://www.yoavshapira.com





This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]