Comment 4 for bug 1694923

Revision history for this message
Thorsten Schöning (tschoening) wrote :

> My unimportant opinion is - yes - it should find and try to compress all old files.
> Because there is no guarantee the job ran on the former days.

I get your point and therefore simply disabled compression for now, which was responsible the error mails from cron.

> Also thinking about your case it will zip 2017-05.log on the second day of may,
> and then refuse to overwrite the zipped file right?

Yes.

> So you end up with a small log from day 1 zipped and a huge unzipped log of days 2-days-of-month.

Partly correct, because it's about my own web apps, not Tomcat itself, and those log errors only. As errors don't occur very often, the file might be pretty small for a whole month, even of size 0. So the problem is not file size, but the approach trying to compress it each and every day even if it's size 0, just because all "old" files should be compressed. And because those files are of size 0 most of the time, it doesn't make sense to name them by day in opinion.

> Plus day-of-month-1 warnings that there was a file in the way right?

Correct and that's a bit annoying.

> I think since you customized from the default which is logs per day to become logs per month.

I didn't change Tomcat itself, only my own web apps are logging per month by default into subdirs of /var/log/tomcat7. So in fact I have both, Tomcat still logging per day, me logging per month. Simply because I prefer per month, but don't care enough for Tomcat itself to change it and customize working default configs.