From: Claudio D. <o1...@ti...> - 2004-01-10 10:04:59
|
Hi Bill, I use the following commons-logging.properties file to force the Jakarta Commons Logging system to use a specific Log: --BOF-- # # Instruct the JCL default LogFactory to instantiate our specific # implementation. # org.apache.commons.logging.Log=com.tntstudio.log.ConsoleLogger # Our logger can be configured by setting few properties in the # "console-logger.properties" file. --EOF-- (I've written the ConsoleLogger class just for fun...) Everything is logged by our class correctly to a text file, also proxool-0.6 messages. On the countrary, proxool-0.8.3 logs messages using its Jdk14Logger; so I get my messages in a text file while proxool messages go to stdout. Moreover, setting the org.logicalcobwebs.logging.Log System property (with -Dorg.logicalcobwebs.logging.Log=com.tntstudio.log.ConsoleLogger) produces the following stack trace: Exception in thread "main" java.lang.ExceptionInInitializerError at com.tntstudio.skyware.Skyware.startup(Unknown Source) at com.tntstudio.skyware.Skyware.main(Unknown Source) Caused by: org.logicalcobwebs.logging.LogConfigurationException: org.logicalcobwebs.logging.LogConfigurationException: org.logicalcobwebs.logging.LogConfigurationException: Class com.tntstudio.log.ConsoleLogger does not implement Log at org.logicalcobwebs.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:526) at org.logicalcobwebs.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:279) at org.logicalcobwebs.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:250) at org.logicalcobwebs.logging.LogFactory.getLog(LogFactory.java:380) at org.logicalcobwebs.proxool.ProxoolDriver.<clinit>(ProxoolDriver.java:28) ... 2 more Caused by: org.logicalcobwebs.logging.LogConfigurationException: org.logicalcobwebs.logging.LogConfigurationException: Class com.tntstudio.log.ConsoleLogger does not implement Log at org.logicalcobwebs.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410) at org.logicalcobwebs.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:519) ... 6 more Caused by: org.logicalcobwebs.logging.LogConfigurationException: Class com.tntstudio.log.ConsoleLogger does not implement Log at org.logicalcobwebs.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:406) ... 7 more I know it's silly to write a new SimpleLog as I did :(, but I think proxool's internal JCL prevents usage of any other org.apache.commons.logging.Log implementation. Claudio |