I am not following.  I already have slf4j in my stack (needed by other 
libraries), although I've written no code that directly interacts with it.

I assume that you are telling me to implement getParentLogger() in my 
datasource (so that it compiles in Java7) and that I should put a couple lines 
of code based on slf4j to get that parent logger so that it really is 
reflecting the log4j logger.  

The obvious dumb question is... what would that code look like?

-----Original Message-----
From: Douglas E Wegscheid [mailto:[email protected]] 
Sent: Thursday, January 12, 2012 6:51 AM
To: Log4J Users List
Cc: [email protected]
Subject: Re: Log4j and Java7/JDBC4.1's CommonDataSource.getParentLogger()

I have hit the same situation with software that requires use of Apahce commons 
logging, I use slf4j (and have it feed log4j); it has adapters to let you log 
from j.u.l and commons logging. I don't know if it's best practice, but it 
certainly works.
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // [email protected] "A wrong note played 
hesitatingly is a wrong note. A wrong note played with conviction is 
interpretation."



BRUNO MELLONI <[email protected]>
01/11/2012 05:56 PM
Please respond to
"Log4J Users List" <[email protected]>


To
"[email protected]" <[email protected]>
cc

Subject
Log4j and Java7/JDBC4.1's CommonDataSource.getParentLogger()






Just upgraded from Java 6 to Java 7 and got a nasty surprise.

I have a class that extends from JDBC's AbstractDataSource.  Java 
7/JDBC4.1 requires implementing  the abstract method getParentLogger() 
from CommonDataSource.  The method returns a java.util.logging.Logger, but 
I use log4j.

I imagine that this problem has been encountered before and solved.

What is the best practice solution?




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to