Relevant Documentation
What you need to know
- Levels: TRACE < DEBUG < INFO < WARN < ERROR
- How do I configure logging in dropwizard so that logs go to different (relevant) files?
- Define a logger (by classpath prefix) and a specific appender.
- Appenders should be specific files.
- You can specify threshold or level filters.
logging:
level: INFO
loggers:
"io.dropwizard":
level: INFO
additive: false
appenders:
- type: file
currentLogFilename: $APP_HOME/var/log/dropwizard.log
archivedLogFilenamePattern: $APP_HOME/var/log/dropwizard-%d.log.gz
archivedFileCount: 5
"org.hibernate.SQL":
level: DEBUG
additive: false
appenders:
- type: file
currentLogFilename: $APP_HOME/var/log/app-sql.log
archivedLogFilenamePattern: $APP_HOME/var/log/app-sql-%d.log.gz
archivedFileCount: 5
appenders:
- type: console