Reputation: 6116
I am trying to write the application.yml
file with the logging configurations for spring boot. Thanks to Bal from my previous question I was able to take a look at the sample file on spring boot's website. Since I only want to configure the logging information for now here is what my yml file looks like right now:
# ===================================================================
# SPRING BOOT PROPERTIES
# ===================================================================
# LOGGING
logging:
config: /logback.xml # Location of the logging configuration file. For instance `classpath:logback.xml` for Logback
logging.level.org.springFramework=DEBUG # Log levels severity mapping. For instance `logging.level.org.springframework=DEBUG`
path: # Location of the log file. For instance `/var/log`
pattern:
console: # Appender pattern for output to the console. Only supported with the default logback setup.
file: # Appender pattern for output to the file. Only supported with the default logback setup.
level: # Appender pattern for log level (default %5p). Only supported with the default logback setup.
But I have a few questions:
logback.xml
file? Should any logging configuration be put here at all versus putting it all in logback.xml
?ch.qos.logback.classic.Level=DEBUG
Upvotes: 1
Views: 1134
Reputation: 4683
logback.xml
with application.yml
. Use either simplified configuration via application.yml
if it is enough for you or use "fullfeatured" logback.xml
.To be honest I am not sure what will happen when you will have contradicting configuration in those two files (e.g. different patterns or log levels).
2 + 3. My guess is you have extra logging
part. Correct example would be e.g.
logging:
level:
ch.qos.logback.classic: DEBUG
org.hibernate: INFO
Upvotes: 1