-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 1/29/14, 10:39 AM, André Warnier wrote:
> Mark H. Wood wrote:
>> On Tue, Jan 28, 2014 at 12:32:22PM -0500, Daniel Mikusa wrote:
>>> On Jan 28, 2014, at 12:05 PM, Vye <v...@vye.me> wrote:
>>>> I have been unsuccessfully trying to remove the date from
>>>> catalina’s log file name. My ultimate goal is to logrotate
>>>> the file, which is best done when the file name is static.
>>> I’m curious, why are you trying to do this?  The log files are
>>> being rotated out-of-the-box.  They rotate by date, hence why
>>> the date is part of the name.  Why do you need to rotate them
>>> with some other tool?  What doesn’t work about the
>>> out-of-the-box configuration?
>> 
>> I agree.  logrotate is a very nice crutch for use when the
>> application doesn't rotate its own logs, but it is better to use
>> the application's rotation code when it exists, since the
>> application (with full knowledge of its internal state) can do
>> this more safely and efficiently than any external tool.
>> 
>> Cleaning up old log files is easily done with a simple cron job,
>> if the application does not trim old files.  That operation can
>> be done just as well externally as internally.
>> 
> 
> A dissenting voice : As a sysadmin in charge of many systems and
> different applications, it is very nice to be able to use the
> *same* tool, same logic, same frequency, same archiving logic, same
> configuration files etc. for handling the logs of all applications.
> One does not really have time to investigate the details of the
> individual logic and configuration of logging for each application,
> and write scripts to bring the errant ones back in line with the
> rest.
> 
> In that sense - and I repeat, in that sense - Tomcat's standard
> logging logic differs from most of the rest, and this is a pain.

This is absolutely true. There are two reasons for this: it's Java and
the server has to have a long lifecycle for anything to make sense.
You can basically bounce httpd any time you want and almost nothing
gets lost. The same cannot be said for Tomcat.

MBeans could (and probably should) for things like re-initializing
loggers: you could move (rename) the file on the disk and then tell
Tomcat to bounce the logger via JMX. That would work for everything
except for catalina.out, which is what most people complain about. If
the JVM could be counted on not to generate any errors before Tomcat
has a chance to intercept System.out and write it to another log file,
then that could be done and the logging system could again be
controlled via JMX.

I'd be interested to hear opinions about the tenability of such a
strategy.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJS6UB+AAoJEBzwKT+lPKRY4tMQAIpDw8YDLFRF5Em++CfXhP+u
B2zzEzzoEvIXhc39WivAajhrUnAJHtiH36jmAm6vmlEPlxIgpn3hDBlyvklHTc4d
3obTEFwGZ11QAzhqVXKXXVCkZIZv5gOX6eANASqN667G54F3JEV9zd8ShBu0nIJ0
DMqNErAnHz7FS7FtB+4bZ0JrhWwZSjLGWV8ZobvK8zoC4Dq0BAyUO8VzVkmqRMR+
VOdjxnRHssYbNQf+s5wSq7AAzrxGWVfqgxzjI//hS/DskkIsxbybzx5gRpzg55Q3
EMvv1QeGfp3DC+lcRymaBh2E4q3JTn5jCzJvZDR7jgtT86l2z0hI+viZ1RRORNnJ
bTTBySihjuNRMPKcEfKg8zLea4jGanAlUhUobQo6Js7kH6NAytkgGoacpO/+6trO
JTFVfsWs6rT71/ClWL1RQPCj+2622JAhR2oxE5a8iu6wmCVTo4463iOaFjbW5qZz
b6fYVgRvDFjyrfz7xrZPL4dWl9+20RM6+uejHujoQ0UMSeaHfgLmWD7hEIak1mzl
Ffpv/74I5UjtRc8szDTJkYfWxaH4c+JEsK9i/7PuADlntLGBnt9SrOP1JQrA762E
dqu4Hqk1+m4Fc+zolfsnsSEcLi9o1vTzdPAuJwXSkGl775OKQqerFoId5w/5O4KE
3GdLp+UjhPkj9nooAtA6
=PBP1
-----END PGP SIGNATURE-----

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

Reply via email to