Castor integration with log4j

644 Views Asked by At

I have integrated Castor within my application for Java - XML mapping and would like to get some logging info via log4j (like inspect the marshalled xml).

I added this to my log4j config file but I'm not seeing any castor related logging.. do i have to do anything additional to get Castor to work with log4j?

2

There are 2 best solutions below

0
On

I don't know if Serkan Arıkuşu's answer is out of date or just incorrect, but in castor-xml 1.4.1, the logging category to use is org.exolab.castor.xml:

log4j.category.org.exolab.castor.xml=DEBUG
0
On

Defining a log category will help you

log4j.category.org.castor=DEBUG