tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Juli/Logging
Date Wed, 01 Aug 2007 18:26:02 GMT

On Aug 1, 2007, at 1:30 AM, Rainer Jung wrote:

> David Blevins wrote:
>>> My personal opinion: java.util.logging very much lacks a good  
>>> formatter. The default 2 line formatting of messages, splitting  
>>> timestamps and message in separate lines, is not really useful in  
>>> production. Many ad hoc log analysis practices work on a line  
>>> oriented basis.
>> Was wondering about that.  I've heard people grumble about  
>> java.util.logging, but haven't (till now) heard anything  
>> specific.  Maybe I wasn't paying close enough attention, but the  
>> Tomcat 6 log files still seem to follow the one line per message  
>> format.  How did you pull that off?
>
> That's what I get:
>
> Aug 1, 2007 10:26:37 AM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-28680
> Aug 1, 2007 10:26:37 AM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 2854 ms
> Aug 1, 2007 10:26:37 AM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Aug 1, 2007 10:26:37 AM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
> Aug 1, 2007 10:26:40 AM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-28680
>
> One line for timestamp, class and method, a second line for log  
> level and message. That's the format of the default formatter, the  
> simple log format.
>
> That's why it would be nice if someone took the burden of writing a  
> better log formatter for j.u.l.

Got it.  Yea, that format is certainly grep unfriendly.

Looks like Harmony has a formatter we could copy from and fix to not  
add the new line.

   http://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk/ 
modules/logging/src/main/java/java/util/logging/SimpleFormatter.java


-David


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


Mime
View raw message