-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 André,
André Warnier wrote: | Is it possible to change this so that Tomcat5.5 would produce a single | logfile e.g. per month (catalina.yyyy-mm.log), instead of one per day ? IIRC, Tomcat does not do any log rolling of any kind on its own. Tomcat uses commons-logging for just about everything, and commons-logging can be configured to work with a particular logging system (juli, log4j, etc.). Those other logging systems typically have rolling capabilities and are not covered by Tomcat's documentation (because that configuration is covered by the documentation of whatever logging package you are using). For instance, log4j can be configured to roll once per month by specifying this in the configuration: log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender log4j.appender.A1.file = @app-log-dir@/log4j.log # Roll-over the log once a day log4j.appender.A1.DatePattern='.'yyyy-MM Contrary to its class name, DailyRollingFileAppender rolls whenever it makes sense given the DatePattern that you set it up to use. See the log4j javadoc for this class for detailed information on configuring this appender (which is what log4j calls classes that actually write to log files). If you allow your logging package to roll your log files for you, you don't have to run cron jobs like Debian is apparently configured to do. Also, all the configuration goes with the application (or the server), instead of spread around the filesystem in the Debian case. | Or is there a better way to manage this proliferation of logfiles ? | (and please, if possible, do not tell me that I have to read and | understand the log4j documentation for this, as I am a mere Tomcat user.) Heh. Sorry. If you want to use log4j, you're gonna have to read the log4j documentation. Unless, of course, you're okay with everything going to catalina.out and having shell script roll your logfiles in unpredictable ways. I'm disappointed in your unwillingness to read documentation for libraries that you use. You wouldn't call General Electric to ask them how to cool a steak just because you keep it cold in a GE freezer. By the same token, don't expect anyone in the Tomcat community to give you a primer on how to configure log4j when the documentation is just begging to be read over at logging.apache.org. :( | And, as a second question : do we really need the STDOUT/STDERR of | Tomcat when it is running as a daemon ? Can I just replace some of the | above to redirect Tomcat's STDOUT/STDERR > /dev/null ? You could, but I wouldn't recommend it. | Or would we then lose some essential information ? What happens if your logging configuration is broken? In that case, you'd get /no/ output whatsoever, and you'd never know why. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhS3gkACgkQ9CaO5/Lv0PDBfACeNlmYSCC3fdNBhCyPXddkJTZ4 E/EAn3rEqQklAMqjSszNt/bdI9qUNoTM =9uC3 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]