* Stefan Wimmer <[EMAIL PROTECTED]> wrote on 30/Oct/2002 - 03:22:30 :
> Hello to everyone, 
> 
> I was parsing this mailing list, google and the tomcat documentation and
> did not find the answer to my question:
> 
>     "Can I change the default log rotation from daily to monthly?"
> 
> As far as I can see there was such a functionality in TC 3.3 called
> 'LogSetter' - I could not find that back in TC 4.* ...
> 
> Can I use Lifecycle Listeners by any chance to influence the log
> rotation?
> 
> If anyone can give me an answer I'd *really* appreciate that ;-)
> 

Hi people, 

does getting no responses mean that there is no answer or that it is too
simple to fix that ;-)

For my part I was busy yesterday to look in FileLogger.java what I can
do and this is the crude result:

        // If the date has changed, switch log files
        /* not in use - [EMAIL PROTECTED] 301002
        if (!date.equals(tsDate)) {
            synchronized (this) {
                if (!date.equals(tsDate)) {
                    close();
                    date = tsDate;
                    open();
                }
            }
        }
        */

        if (writer == null) {
            open();
        }   
        

I removed the daily switch functionality and from now on there will be just
*one* logfile for every Logger I define ;-) I admit it is very crude but it
works. If there is any time left I'll investigate how to expand the
functionality on a daily, weekly or monthly basis configurable via server.xml

But saying that I have to admit again that my Java knowledge is very bad - good
chance too expand that as well ;-)

Greetz
Stefan

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to