Is there a way to set the logging level for the java.lang.System.Logger
on the command line? Using properties files baked into the JAR is a no-go, since I want to have the same JAR in staging and production environments with the difference that the staging environment has more verbose logging.
Asked
Active
Viewed 237 times
0

eof
- 413
- 4
- 14
1 Answers
0
Each implementation of java.lang.System.Logger
works differently, so there's no uniform way to set it for all implementations.
If you happen to use SimpleConsoleLogger
, you can set the environment variable jdk.system.logger.level
.

Augusto
- 28,839
- 5
- 58
- 88
-
Right, I hadn't configured the logger myself for this software. It's using java.util.logging.ConsoleHandler – eof Mar 11 '22 at 17:43