tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Len Popp" <len.p...@gmail.com>
Subject Re: Juli/Logging
Date Fri, 03 Aug 2007 15:36:34 GMT
OK, that's a useful compromise that makes log files easier to deal with.

Suggestion: If the timestamp appeared on the first line of the stack
trace (in addition to the preceding error message line), it would be
easier to search a log file for an exception, say
"OutOfMemoryException", and then locate that line in the file to see
the rest of the info. For example:

2-Aug-2007 9:41:28 PM SEVERE: Servlet.service() for servlet Test threw exception
2-Aug-2007 9:41:28 PM java.lang.OutOfMemoryError
	at com.example.app.Test.testGenerateException(Test.java:115)
	at com.example.app.Test.doGet(Test.java:35)
  [etc.]

-- 
Len

On 8/3/07, Rainer Jung <rainer.jung@kippdata.de> wrote:
> Stacks are always special. It's usually unfeasible to push them into one
> line. My argument was about usual log messages. Of course in a fully
> fledged new formatter, one would wish things like configuring the depth
> of the stack printed.
>
> Len Popp wrote:
> > On 7/31/07, Rainer Jung <rainer.jung@kippdata.de> 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.
> >
> > How would exception stack traces be handled? That's an important
> > consideration because a stack trace is the first thing people ask for
> > when someone has a problem. :-)
> > I like the idea of one line per entry, but stack traces don't seem to
> > fit into that format. If you collapse a stack trace onto one line,
> > it's a lot harder to read. If you keep the multi-line format for stack
> > traces, you keep the same problem with log analysis practices that
> > work on a line oriented basis.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

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


Mime
View raw message