logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: What is the Current State of Logging in Java? What version should I use?
Date Fri, 14 Sep 2007 17:29:27 GMT

On Sep 14, 2007, at 11:35 AM, Andrew Leer wrote:

> Hello,
>
> I am very confused about the state of logging in Java.
>
> As far as I can tell so far, it appears that currently the log4j team
> has dropped any plans to continue developing log4j 1.3, and this has
> left the users to use log4j 1.2.15, while they develop the not yet
> released log4j 2.0.  Am I correct in this assumption?
>

That is correct.  Much of the development around log4j 1.2.15 and the  
companions were to make a reasonable migration path for log4j 1.3  
alpha users back to log4j 1.2.x.

> Currently I have been using log4j-1.3alpha-8 which I had to compile
> myself since it isn't in any repository (probably due to its alpha
> release state).  I wouldn't normally use an alpha release, but it
> seems to be a necessity since Chainsaw V2 will not place logging
> events into two different tabs unless you use a (PropertyFilter) to
> specify the Application and Hostname properties to the logging events;
>
> Unfortunately, if you wish to add properties to logging events using a
> simple configuration file, the use of log4j-1.3alpha seems required,
> as log4j-1.2.x does not have the PropertyFilter class.

The PropertyFilter was problematic even in log4j 1.3 and couldn't be  
implemented in log4j 1.2 without significant modification.  It really  
wasn't a filter and other appenders would see the changes that  
PropertyFilter would make to the event.  The RewriteAppender was  
added to the receivers companion to provide the functionality  
provided by PropertyFilter and MapFilter.  See bug http:// 
issues.apache.org/bugzilla/show_bug.cgi?id=41483.  The receivers  
companion is expected to be released in conjunction with a Chainsaw  
release.  To build it assuming Maven 2.0.7 is on the path:

$ svn co https://svn.apache.org/repos/asf/logging/log4j/companions/ 
receivers/trunk receivers
$ cd receivers
$ mvn package

A sample configuration file for property rewriting is available at  
src/test/resources/org/apache/log4j/rewrite/property.xml.

>
> So my question is, at this point in time, what version of
> log4j/chainsaw should I use to send logging events to separate tabs in
> chainsaw?
>
> Thank you,
>     Andrew J. Leer

You may be able to use log4j 1.2.15 + receivers 1.0-SNAPSHOT to  
replicate what you were doing with log4j 1.3 without switching  
Chainsaw versions.

The current Chainsaw SVN HEAD is based on log4j 1.2.15, but hasn't  
been pushed to a release yet.  To build it, you would do:

$ svn co https://svn.apache.org/repos/asf/logging/log4j/companions/ 
receivers/trunk receivers
$ cd receivers
$ mvn install
$ cd ..
$ svn co https://svn.apache.org/repos/asf/logging/log4j/companions/ 
zeroconf/trunk zeroconf
$ cd zeroconf
$ mvn install
$ svn co https://svn.apache.org/repos/asf/logging/chainsaw/trunk  
chainsaw
$ cd chainsaw
$ mvn package

>
> P.S. I'm using a SocketAppender to send the events to from log4j to
> chainsaw.  I tried using different ports to do this, but they always
> end up in the same tab.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message