I am able to make my logging.properties active. That's not the problem.
I'm unable get my custom formatter being used! This seems to be more of a class loader issue. Using MAVEN_OPTS works equally to using -D on the command line. -Max On 11/28/2012 03:43 PM, Kohsuke Kawaguchi wrote:
On 11/27/2012 06:03 PM, Max Spring wrote:I'm struggling getting a custom formatter to play under hpi:run. I can pass my own logging.properties on the command line: mvn hpi:run -Djava.util.logging.config.file=my-logging.properties but my formatter doesn't get used.I haven't read the code, but I suspect java.util.logging is using the system property value before Maven gets to process its command line arguments and makes the corresponding System.setProperty(...) call. Try setting it via MAVEN_OPTS env variable.I can switch on/off the built-in XMLFormatter. This proves that my-logging.properties are active: java.util.logging.ConsoleHandler.formatter = org.example.MyFormatter # java.util.logging.ConsoleHandler.formatter = java.util.logging.XMLFormatter I suspect this is similar to this problem: http://jenkins.361315.n4.nabble.com/how-to-set-logging-properties-td3479817.html But I can't figure out how to make my formatter class visible. Adding it to the Jenkins war doesn't do the trick here. Has anyone solved this? Thanks! -Max
