logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <psm...@aconex.com>
Subject Re: Chainsaw dependencies on log4j 1.3
Date Tue, 10 Apr 2007 22:28:19 GMT
A good summary Curt.  You'd be pointing us in the direction of making  
log4j 1.2 more like 1.3 though.

I like the idea of breaking out the Receiver stuff into an optional  
jar for 1.2.  I can't remember if log4j1.2 had the Plugins stuff, but  
even if it did, I'm sure I and others have made some changes to  
that.  Again, that could be ported, but we're starting to make a  
significant 1.2 change, and wouldn't it make more sense to call it.... 
1.3? :)

As a very quick hack to 1.3, I was considering testing some 1.3  
LoggingEvent changes to return MDC serialization compatibility, even  
if it wasn't optimal.

On 11/04/2007, at 6:28 AM, Curt Arnold wrote:

> I did an experiment of building chainsaw against the current SVN  
> for log4j 1.2 and have a rough analysis of the dependencies issues:
>
>
>     [javac] Compiling 102 source files to /Users/curta/ls-svn/ 
> chainsaw/build
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/ChainsawAppender.java:23: cannot find symbol
>     [javac] symbol  : class Constants
>     [javac] location: package org.apache.log4j.helpers
>     [javac] import org.apache.log4j.helpers.Constants;
>
> This error occurs in several files where chainsaw attempts to  
> access string constants APPLICATION_KEY, HOSTNAME_KEY and  
> LOG4J_ID_KEY.  The easiest remedy would add these constants to  
> ChainsawConstants.
>
>
>
>
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/ChainsawAppenderHandler.java:30: package  
> org.apache.log4j.rule does not exist
>     [javac] import org.apache.log4j.rule.ExpressionRule;
>     [javac]                              ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/ChainsawAppenderHandler.java:31: package  
> org.apache.log4j.rule does not exist
>     [javac] import org.apache.log4j.rule.Rule;
>
>
> Chainsaw makes extension use of the org.apache.log4j.rule package  
> that supports org.apache.log4j.filter.ExpressionFilter and  
> org.apache.log4j.LocationInfoFilter.  Those filters may be useful  
> to a log4j 1.2.x user, so it may be useful to backport them to be  
> compatible with log4j 1.2.x and either incorporate them into log4j  
> 1.2.x or make them available an add-on for log4j 1.2.x.
>
>
>
>     [javac]                              ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/ChainsawAppenderHandler.java:33: cannot find symbol
>     [javac] symbol  : class LoggerRepositoryEx
>     [javac] location: package org.apache.log4j.spi
>     [javac] import org.apache.log4j.spi.LoggerRepositoryEx;
>     [javac]                             ^
>
> The LoggerRepositoryEx interface added methods to monitor the  
> addition of new loggers and appenders and several other functions.   
> Will need to review how these are used.  If they are added, it  
> would likely have to be implemented in log4j 1.2.x itself.
>
>
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/ChainsawAppenderHandler.java:29: cannot find symbol
>     [javac] symbol  : class SocketReceiver
>     [javac] location: package org.apache.log4j.net
>     [javac] import org.apache.log4j.net.SocketReceiver;
>     [javac]                             ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/LogUI.java:107: cannot find symbol
>     [javac] symbol  : class SocketNodeEventListener
>     [javac] location: package org.apache.log4j.net
>     [javac] import org.apache.log4j.net.SocketNodeEventListener;
>     [javac]                             ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/ChainsawAppenderHandler.java:34: cannot find symbol
>     [javac] symbol  : class LoggingEventFieldResolver
>     [javac] location: package org.apache.log4j.spi
>     [javac] import org.apache.log4j.spi.LoggingEventFieldResolver;
>     [javac]                             ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/ChainsawAppenderHandler.java:52: cannot find symbol
>     [javac] symbol  : class LoggingEventFieldResolver
>     [javac] location: class  
> org.apache.log4j.chainsaw.ChainsawAppenderHandler
>     [javac]   private final LoggingEventFieldResolver resolver =  
> LoggingEventFieldResolver
>     [javac]                 ^
>     [javac]                             ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/receivers/PluginPropertyEditorPanel.java:54: cannot find  
> symbol
>     [javac] symbol  : class SocketHubReceiver
>     [javac] location: package org.apache.log4j.net
>     [javac] import org.apache.log4j.net.SocketHubReceiver;
>     [javac]                             ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/receivers/ReceiversPanel.java:71: cannot find symbol
>     [javac] symbol  : class SocketNodeEventListener
>     [javac] location: package org.apache.log4j.net
>     [javac] import org.apache.log4j.net.SocketNodeEventListener;
>     [javac]                             ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/receivers/ReceiversPanel.java:72: cannot find symbol
>     [javac] symbol  : class SocketReceiver
>     [javac] location: package org.apache.log4j.net
>     [javac] import org.apache.log4j.net.SocketReceiver;
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/receivers/ReceiversPanel.java:435: cannot find symbol
>     [javac] symbol  : class Receiver
>     [javac] location: class  
> org.apache.log4j.chainsaw.receivers.ReceiversPanel
>     [javac]   private Receiver getCurrentlySelectedReceiver() {
>     [javac]           ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/FileMenu.java:41: cannot find symbol
>     [javac] symbol  : class UtilLoggingXMLDecoder
>     [javac] location: package org.apache.log4j.xml
>     [javac] import org.apache.log4j.xml.UtilLoggingXMLDecoder;
>     [javac]                             ^
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/FileMenu.java:42: cannot find symbol
>     [javac] symbol  : class XMLDecoder
>     [javac] location: package org.apache.log4j.xml
>     [javac] import org.apache.log4j.xml.XMLDecoder;
>     [javac]                             ^
>
> I'm guessing all the receiver stuff is unlikely to be used anywhere  
> outside of Chainsaw.  However, it might still be useful to package  
> them up as a distinct package.
>
>
>
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/LogUI.java:106: package org.apache.log4j.joran does not exist
>     [javac] import org.apache.log4j.joran.JoranConfigurator;
>     [javac]                               ^
>
> Likely could be changed back to DOMConfigurator.
>
>
>     [javac] /Users/curta/ls-svn/chainsaw/src/java/org/apache/log4j/ 
> chainsaw/LogUI.java:108: package org.apache.log4j.plugins does not  
> exist
>     [javac] import org.apache.log4j.plugins.Plugin;
>
> Chainsaw uses the plugins package internally and they are also used  
> in the log4j receivers.  I think it would probably be best to keep  
> them with the receivers.
>
> My suggestions would be to start two new sandbox projects, one for  
> the rule filters and one for the receivers+plugin.  Alternately,  
> rules could go into log4j 1.2 and receivers+plugin could go  
> chainsaw.  Change the org.apache.log4j.spi.Constant references to  
> org.apache.log4j.chainsaw.ChainsawConstant references and review  
> the usage LoggerRepositoryEx and DOMConfigurator.
>
> I've confirmed that log4j 1.2.x does serialize the MDC content, it  
> is just that the log4j 1.3 deserialization doesn't pick it up.   
> Likely if Chainsaw was hosted in log4j 1.2, the MDC content would  
> show up for log4j 1.2 clients and disappear for log4j 1.3 clients.   
> I think it is possible that you might be able to write a custom  
> serialization that could read both log4j 1.2 and log4j 1.3  
> serialization.  I'm skeptical that it could be done with default  
> serialization.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>

Paul Smith
Core Engineering Manager

Aconex
The easy way to save time and money on your project

696 Bourke Street, Melbourne,
VIC 3000, Australia
Tel: +61 3 9240 0200  Fax: +61 3 9240 0299
Email: psmith@aconex.com  www.aconex.com

This email and any attachments are intended solely for the addressee.  
The contents may be privileged, confidential and/or subject to  
copyright or other applicable law. No confidentiality or privilege is  
lost by an erroneous transmission. If you have received this e-mail  
in error, please let us know by reply e-mail and delete or destroy  
this mail and all copies. If you are not the intended recipient of  
this message you must not disseminate, copy or take any action in  
reliance on it. The sender takes no responsibility for the effect of  
this message upon the recipient's computer system.




Mime
View raw message