tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Larsen" <>
Subject Rantings about FileLogger (TC 4.0.3)
Date Thu, 11 Apr 2002 17:04:48 GMT
I was just perusing the source code for org.apache.catalina.logger.FileLogger
because, like many of you, I don't like the clutter of daily log file rotation.

I noticed that even if timestamps are turned off, the FileLogger class still
calls System.currentTimeMillis() on every log call!! It does this to check the
date to see if the file needs to be switched.  Not only that, but it creates
two new String objects for the timestamp even if you aren't logging it. The 
only performance gain is the skipped call to write the timestamp to the file. 
So if you think you're saving resources by turning off timestamps, think again...

I also noticed that FileLogger is declared "final". WHY!?!?!?!?!? It would be
so easy to extend FileLogger to create my own rotation scheme. And while I'm
at it, why is LoggerBase NOT "public"!?!?!?!? So now if I want to create my
own logger, I have to implement the Logger interface from scratch.

Tomcat developers, what's the deal? 

My $0.02,


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message