I am getting tons of info log messages from a 3rd party jar in my eclipse console. Cracking open the jar I see that it uses java.util.logging. I would like to set the output level for their jar to WARNING.
I have tried using the VM argument of -Djava.util.logging.config.file=pathToMy/JUL.properties where the contents of the file are:
handlers=java.util.logging.ConsoleHandler
.level=WARNING
java.util.logging.ConsoleHandler.level=WARNING
Unfortunately, that made no difference in the output.
If it makes it any easier, my application uses SLF4J. So if there's a simple answer using a different logging mechanism I can just switch my binding to use it.
Before decompile the jar to find how to set Log level you can try to search the setLogLevel api for which component you want debug more.
I think you may have the following snippet useful. It will allow you to set the log behaviour at package level:
Have you used JConsole to determine that:
You can also add the following code to check that your config file is working: