I want to add logging to a number of internal Java webstart applications, preferably using the logback logging framework and logback.groovy
configuration files. I expect to specify this in the webstart application .jnlp
file, but it's not clear how to do this.
I have tried adding the logback.groovy
file in the resources of my main jar (i.e. that which contains my main method), but that didn't get picked up by logback.
I have also tried various attempts to add the logback.groovy
file to the <resources>
section of the .jnlp
file:
<jnlp ...>
<resources>
<j2se version="$j2seVersion" />
$dependencies // from maven-webstart-plugin
// some reference to my logback configuration - e.g.
<dir href="log/" />
</resources>
</jnlp>
It's worth noting that logback expects the configuration files to be referenced on the classpath as the folder in which it resides, not to the file itself - see FAQs.
However, I'm really not sure how this would apply to Java Webstart.
Is this possible? If so, how do I do this?