Re: [OJB-developers] Log4jLoggerImpl
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-01-18 20:30:31
|
Hi Bertrand, thanks for your code! I will integrate it into the next release. I'm currently working on compatibility issues wrt. MS Access. Once I got OJB running against ACcess I will work on your code. Will take some more days. syl...@be... wrote: > Hi Thomas > > Here is thelog4jLoggerImpl I told you about. > > I had to change a few things in other classes to > make it work. > > The main problem was that with log4j you have to > give a name the logger (log4j Category) when you > create it. > You cannot create a category then do a setname() > afterwards. > So I changed the Logger interface to remove the > setname() method. > Change PoorMansLoggerImpl so that its > constructor did get the name directly and > removed the setname() method. > I then had to change LoggerFactory to call the > constructor with the name as argument. > > I also found interesting to be able to specify a > configuration file for log4j so I changed the > PersistenceBrokerFactoryConfiguration to read > the LoggerConfigFile property. > Yes that's good, as many people will like to reuse their existing Log4J config files. > To help you found the changes I started them > with a //bmi comment. > > Here is a zip file with > Logger.java > PoorMansLoggerImpl.java > LoggerFactory > Log4jLoggerImpl.java > PersistenceBrokerFactoryConfiguration > And two sample configuration file > OJB.properties > Log4j.properties > and > log4j.jar just in case > thanks for your careful description. will help me to things integrated smoothly! > Greetings > > Bertrand > cu, Thomas |