[ 
http://issues.ops4j.org/jira/browse/PAXLOGGING-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_10981
 ] 

Niclas Hedhman commented on PAXLOGGING-17:
------------------------------------------

I disagree with the generic statement "So I think pax-logging must support it 
to be compatible with log4j."
Log4j allows you to navigate all the inner guts, and not separating what the 
true API really is, from SPI and just internal workings. We will NOT support 
all possibilities in this area, and you might find apps that won't work, and 
they probably won't work when Log4j upgrades/downgrades/sidegrades.

Now, that said; For this particular case...

Without in-depth check, it looks like this is usage of MDCs in Log4j. Both MDCs 
and NDCs were considered by myself beyond the level of support wanted. 
Agreeably my own personal opinion and not at all debated.

We have a couple of choices;

 1. Ignore this (you not happy)
 2. Implement a hack and ignore NDC and MDC aspects.
 3. Create a Context system for Pax Logging.

I am actually been assigned to upgrade the Log Service spec for the OSGi 
Alliance, and one of the items I have brought up myself is the need for 
context-aware separation of logging, so I can differentiate between "Audit 
Trail" and "Debug Tracing" for instance.

> NoSuchMethodError: 
> org.apache.log4j.Logger.log(Ljava/lang/String;Lorg/apache/log4j/Priority;Ljava/lang/Object;Ljava/lang/Throwable;)V
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PAXLOGGING-17
>                 URL: http://issues.ops4j.org/jira/browse/PAXLOGGING-17
>             Project: Pax Logging
>          Issue Type: Bug
>         Environment: pax logging 0.9.8, c3p0 0.9.1
>            Reporter: Damian Golda
>            Assignee: Niclas Hedhman
>
> Error while creating instance of com.mchange.v2.c3p0.ComboPooledDataSource:
> Instantiation of bean failed; 
> Caused by: java.lang.NoSuchMethodError: 
> org.apache.log4j.Logger.log(Ljava/lang/String;Lorg/apache/log4j/Priority;Ljava/lang/Object;Ljava/lang/Throwable;)V
>  
> at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.log(Log4jMLog.java:159) 
> at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.log(Log4jMLog.java:162) 
> at com.mchange.v2.log.MLog.<clinit>(MLog.java:80) 
> at 
> com.mchange.v2.naming.JavaBeanReferenceMaker.<clinit>(JavaBeanReferenceMaker.java:39)
>  
> at 
> com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.<clinit>(PoolBackedDataSourceBase.java:203)
>  
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> Log4jMLog:159:
>         private void log(Level lvl, Object msg, Throwable t)
>         { logger.log( FQCN, lvl, msg, t ); }
> where FQCN is String:
>         final static String FQCN = Log4jMLogger.class.getName();
> So it is called:
> Category.log(String, Level, Object, Throwable) which is not present in Logger 
> from pax-logging-api!!!
> This metod is still present in log4j 1.2.15:
>   /**
>      This is the most generic printing method. It is intended to be
>      invoked by <b>wrapper</b> classes.
>      @param callerFQCN The wrapper class' fully qualified class name.
>      @param level The level of the logging request.
>      @param message The message of the logging request.
>      @param t The throwable of the logging request, may be null.  */
>   public
>   void log(String callerFQCN, Priority level, Object message, Throwable t) 
> So I think pax-logging must support it to be compatible with log4j.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.ops4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to