adding multiple classes to a particular log file

5 views
Skip to first unread message

jason....@gmail.com

unread,
Oct 14, 2025, 5:56:31 PM (11 days ago) Oct 14
to dropwizard-user
I was able to do the following in order to log one particular class to its own log file using Dropwizard YAML:

loggers:

# Sets the level for 'com.example.app' to DEBUG.
com.xyz.mappers: INFO
com.
xyz: DEBUG
org.reflections: ERROR
"com.
xyz.service.fixflyer.FixFlyerService":
level: DEBUG
# This line stops org.hibernate.SQL (or anything under it) from using the root logger
additive: false
appenders:
- type: file
currentLogFilename: /var/log/
xyz/fixflyer.log
archivedLogFilenamePattern: /var/log/
xyz/fixflyer-%d.log.gz
archivedFileCount: 5

How do I configure it to also add 4 addtl classes e.g.

"com.xyz.service.fixflyer.FixFlyerPartA" and "com.xyz.service.fixflyer.FixFlyerPartB" classes as well?

Thanks, Jason

Clark Breyman

unread,
Oct 15, 2025, 2:45:44 AM (10 days ago) Oct 15
to dropwizard-user
If you want all the classes in a package you can use the package name ("com.xyz.service.fixflyer") for the logger. It might be possible to merge two specific class loggers into one but it would likely require code rather than config.

Regards,
Clark

Reply all
Reply to author
Forward
0 new messages