Page 1 of 1

Disable INFO logging in jar

PostPosted: Tue Jun 02, 2009 11:23 pm
by Leigh
This is probably not docx4j specific, but does anyone know how to disable/change the logging settings? I have tried various things like log4j.properties or log4j.xml files, with different settings. But I must have missed something because it is not disabling the "info" output ;)

Re: Disable INFO logging in jar

PostPosted: Wed Jun 03, 2009 6:18 am
by jason
Leigh wrote:This is probably not docx4j specific, but does anyone know how to disable/change the logging settings? I have tried various things like log4j.properties or log4j.xml files, with different settings. But I must have missed something because it is not disabling the "info" output ;)


That's right, you use the log4j properties settings to change the log settings.

Note that there are currently still a few System.out.println which display stuff when you load/save; log4j settings won't affect these. (These are the one's which will show up without the usual log4j stamp at the start of the line.)

If your changes to log4j settings aren't being noticed, most likely the log4j.properties|.xml is not on your class path. Edit: Or more to the point, there is another log4j.properties|.xml which is on the class path.

cheers .. Jason

Re: Disable INFO logging in jar

PostPosted: Wed Jun 03, 2009 8:10 pm
by Leigh
Jason,

You hit it on both counts. I did have another log4j configuration file in my application path, and (embarrassingly I did not notice some of the lines were System.out not log4j!)

Cheers
Leigh