Java.util.logging in plugin

I have a version2 Confluence plugin where I use a library (which I bundle) that uses java.uti.logging for logging. Now I want those log statements in the Confluence log. I’ve tried achieving this by configuring /confluence/WEB-INF/classes/logging.properties and /confluence/WEB-INF/classes/log4j.properties as described in Configuring Logging | Confluence Data Center and Server 6.3 | Atlassian Documentation, but it doesn’t work. I’ve also tried adding a logging.properties to my plugin jar, but with no success.

Should the instructions linked to above work for a plugin? If not, what is the required configuration?

Hey @anders.hammar,

I’m not sure why your log-statements do not appear in the log files. Have you added the libraries groupId/package-namespace to the Log4J entries in the online-form as explained on the link you refer to?

When I need to debug something on our clients production instances I kindly ask the administrators of those instances to make sure my plugins groupId (or a libraries package-namespace) is in this entry-list (depending on the problem I try to analyze by using the logs, permanently, temporarily, different levels…). This approach works quite well for me.

My understanding is that I have configured everything according to the instructions in the link.
When you say I should add the groupId to the log4j entries, what more exactly do you mean by that? Maven groupId (is that what you’re referring to?) shouldn’t have anything to do with this, should it? Or are you referring to the plugin’s plugin key?

And, to clarify, logging in the plugin (via slf4j) do end up in the log file. It’s the logging from the bundled framework, which uses JUL, that doesn’t end up in the log file.