Is it possible to override/set log level of java.util.logging.Logger by passing an JVM option on start of the application?
Asked
Active
Viewed 1.1k times
7
-
Try http://stackoverflow.com/questions/470430/java-util-logging-logger-doesnt-respect-java-util-logging-level. You can get a clue from that. – ironwood Mar 19 '13 at 08:51
-
this may be helpful: https://stackoverflow.com/questions/2160471/is-there-a-command-line-option-for-setting-the-default-log-level-in-java/67930414#67930414 – morgwai Jun 02 '23 at 22:53
-
Does this answer your question? [Is there a command line option for setting the default log level in Java](https://stackoverflow.com/questions/2160471/is-there-a-command-line-option-for-setting-the-default-log-level-in-java) – morgwai Sep 03 '23 at 00:31
1 Answers
2
There are the following system properties available where you can configure log levels of loggers and initialisation logic.
- java.util.logging.manager
- You can define your own LogManager
- java.util.logging.config.class
- Custom logging configuration as a Class file
- java.util.logging.config.file
- Custom logging configuration as configuration file
The LogManager documentation has more information on them available, http://docs.oracle.com/javase/6/docs/api/java/util/logging/LogManager.html

toomasr
- 4,731
- 2
- 33
- 36