tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gulcu Ceki <>
Subject Re: Tomcat Logging
Date Tue, 22 Aug 2000 14:58:57 GMT

Hi Alex,

Alex Chaffee wrote:
> Here's my vision of What Tomcat Needs from a logging package:
> (1) Configuration (via server.xml)
>  (a) define files or non-file log targets by name
>  (b) tell particular components, or sets of components, where to send
>      their output, based both on message type and/or message source
>   (c) tell particular components how verbose to be (this covers
> 	Costin's need for per-component debug level)
> (2) Component API
>  (a) standard interface for telling components all of 1a,1b,and 1c
>  (b) very simple API for a component to send a message and/or
>      stacktrace to appropriate log (on the order of a mere 'log("foo");'
>      just working)
> (3) Logging Package
>  (a) set of classes for sending messages to wherever they need to go
>  (b) must be high-performance -- if disabled, then take minimal or no
>      CPU/memory
> Analysis of Existing Code:
> log4j would take care of 3 but not 1 or 2

Why is that? In log4j, you can

1a) Define log targets by name,

1b) Tell particular categories or category sets where to send their
output based on their category or message priority,

1c) Tell particular component how verbose to be,

Here, I am assuming that the words category and component are
equivalent. This is the case if components have their own category. 

2a) Definitely. Log4j has a very general interface for configuring
components. You can configure all of log4j environment with a
properties file or an XML file without writing a single line of
code (true for log4j 0.8.5). In previous log4j versions you need a
single line of code to invoke a configurator.

2b) This is usually true for most logging APIs including log4j.

I would be very interested to know why you think log4j does not
fulfill conditions 1 and 2. Regards, Ceki

View raw message