tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Brouwer <>
Subject Re: [VOTE] On Logging
Date Fri, 23 Jun 2000 22:02:55 GMT

Alex Chaffee wrote:
> Vote please:
> Proposal 1: The default timestamp format to be msec-since-epoch, not
> new Date().toString()

> Proposal 2: Add a "timeStampFormat" property to server.xml/Logger,
> which allows for locale-sensitive string date formatting
> Possible values for timeStampFormat:
> "" or null -- use msec-since-epoch
> "FULL", "LONG", "MEDIUM", "SHORT" -- follows semantics of java.text.DateFormat
> other string -- follows semantics of java.text.SimpleDateFormat (e.g. "yyyy-MM-dd hh:mm:ss")

+1 (but your example format should be the predefined format)

I don't use the log functionality of Tomcat in our webapps (own log
framework), but as long as ServletContext.log() will use the log
functionality this is a must. A system admin is not going to retrieve
the time from lots of millis. 

> Proposal 3: Remove concept of debug level from each component; just
> make each logger sensitive to the debug level, and only print messages
> with a low enough level.


> Proposal 4: Set the interface of LogHelper (and probably Logger) to:
>  public void log(int level, String message, Object[] params, Throwable exception)
> and many permutations of above, like
>  public void log(String message, Object[] params)
>  public void log(String message, Object param)
>  public void log(String message, Object param1, Object param2, Throwable e)

As Throwable is an object you can even simplify the API, just mention in
the API params being an instance of Throwable are treated different
(stacktrace, etc).

> where the default level is "Logger.INFORMATION"


> Along those lines, are there any strong feelings for or against
> standardizing server log messages as English?  The arguments for this
> are, it keeps strings right in the code, so it's easier to program and
> maintain, and since no end-users will see the logs, just programmers,
> then the need for localization is less compelling.  Also, it would
> allow standard log parsing tools or scripts to work in any country
> without needing to be localized.

Over here I agree with Costin: 'Debug messages in English, errors and
whatever goes to client internationalized'
Mark Brouwer

View raw message