tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Tomcat logging, request
Date Fri, 25 Oct 2013 11:18:35 GMT
Hi.

This is a humble request to the Tomcat developers.

First an introduction :
This is a mailing list dedicated to helping people use Tomcat, and by extension java 
webapps and java itself.  So it is normal that an overwhelming number of the people who 
are accessing this list and its archives would be java and java webapp developers, for 
which some of the things I mention below will sound like the ABC of the business.

But Tomcat also has another class of users : the thousands of sysadmins who set up and 
keep running "bare Tomcats", and allow all these great Tomcat-based webapps to run.

 From such a sysadmin's point of view, Tomcat (and all its webapps), is one application 
which runs on a server, among tens or hundreds of them.
A part of a sysadmin's job is usually to keep these applications running, which includes 
seeing to it that their logfiles can be easily found, allow the diagnosis of a problem 
when it occurs, but also that they do not fill the disk and ultimately prevent other 
things from running.
There are many applications, on sometimes many systems, to be configured and monitored in

this way, so that anything which generally makes that task easier is very welcome.

For example, a utility such as logrotate, in the sysadmin world, is like a gift of God.
Most server-like programs allow logrotate to rotate their logfiles, compress old ones, 
remove even older ones, etc. to keep things running smoothly over time.
It's a simple thing, but it saves many hours that would otherwise have to be dedicated to

monitoring and reacting to such repetitive occurrences.

Tomcat, at this moment, does not really allow that.
That is because there is no simple mechanism to tell Tomcat to relinquish control of its 
current logfiles for a moment, short of stopping Tomcat completely and restarting it 
(which interrupts the service, sometimes for a significant amount of time).

To this there will probably be a number of answers indicating that Tomcat's Juli or log4j

or whatever already provide ways to achieve this.

I don't want to get into the debate consisting of deciding whether it should be the 
developer of an application, or the sysadmin who runs it, who ultimately decides what an 
application is logging and where it does it.

But the thing is that these tens of thousands of sysadmins do not necessarily want to 
learn java, or learn the intricacies ot Tomcat, or even learn how to configure and setup 
Juli or log4j, just for the sake of this one Tomcat application among many running on 
their systems.

So my request is simple (at least to express) : can someone among the Tomcat luminaries 
not imagine a mechanism by which Tomcat would, on request from an external program or 
script, do something like the Apache httpd does during a "soft reload" : wait for the 
current requests to terminate, close all logfiles and re-open them ?
For example : there already exist a "shutdown port", and a bunch of "Listeners". Could 
there not be a "logs rotate port" or a "logrotate listener" ?

I am not underestimating the possible difficulty of the task, and probably tackling such 
an issue is ultimately less rewarding for a developer than implementing the latest in 
webapp or HTTP technology.

But many sysadmins worldwide would be grateful if this came to pass and I am sure that it

would do a great deal to increase the popularity of Tomcat among them.



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


Mime
View raw message