I have an Spring Boot Web app that needs to use Java Util Logging behind SLF4J. When I don't create a logging.properties
file, the Console Logger works just fine, and all INFO messages & above are logged. When I do create a logging.properties
file, only FATAL errors are logged. It doesn't matter what the logging.properties
file contains - I've tried lots of different configurations - it only logs FATAL errors when this file exists.
Here's the jars I've imported (using Gradle)
implementation("org.slf4j:slf4j-api")
implementation("org.slf4j:slf4j-jdk14")
I also had to make sure logback-classic was not imported, because one of my dependencies was trying to pull it in.
configurations.all {
exclude(group = "ch.qos.logback", module = "logback-classic")
}
Then, here's my logging.properties
file. It's located at src/main/resources/logging.properties
.
handlers = java.util.logging.ConsoleHandler
.level= ALL
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
This is not the only configuration I've tried to use.
Can anyone spot what I'm doing wrong? Why does it only log FATAL errors?