tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gulcu <>
Subject Re: [log4j-dev] Re: Tomcat Logging
Date Mon, 04 Sep 2000 18:19:54 GMT

Hi Again,

As promised, log4j now supports multiple hierachy trees.
This will alllow virtual-hosting servers to log according to
application context as well as by component. 

The most recent version also supports sub-classing of the
Category class as well as the Priority class. These
sub-classes can be configured using an XML config file.

The latest version is not yet released but you can fetch it
from our CVS repository.

cvs -d
cvs -z3
co log4j

Your comments/questions are welcome. Regards, Ceki

Gulcu Ceki wrote:
> Hi Alex,
> > Yes, it's important to keep the ability to maintain multiple log
> > files. One target architecture for Tomcat is an ISP hosting hundreds
> > of different webapps for different clients; with multiple log files
> > (one per webapp) the admin can maintain security (so people can't read
> > each other's logs).
> I have given some more thought to context sensitive log4j categories.
> Log4j currently allows the programmer to easily organize logging
> according to software components. This is it's force.
> Presently, log4j allows only a single instance of the category
> hierarchy tree. Christopher Taylor, the author of
> org.log4j.xml.DOMConfigurator, proposed some time ago that log4j
> should allow multiple hierarchy trees. He actually sent me necessary
> code!
> The coding effort to achieve this would not be high: the
> HierarchyMaintainer class (which maintains the tree) would need to be
> instantiable instead of having only static methods. I think that's it!
> One would use the default hierarchy tree unless an alternate hierarchy
> was specified. It would be the responsibility of the caller to pass
> the necessary HierarchyMaintainer instance.  One could go a step
> further and sub-class Category to transparently (but application
> dependently) retrieve the relevant context and then the hierarchy
> tree.
> This enhancement could be implemented in a very short time. The log4j
> configuration syntax would need to be adapted. This is a little
> trickier but feasible.
> Proliferation of categories and hence associated appenders would mean
> that conflicts are bound to occur. Two appenders in different trees
> trying write to the same file? Trouble...
> Your comments are welcome. Good weekend. Ceki
> _______________________________________________
> log4j-dev mailing list

View raw message