If I use -Dswarm.logging.category.name=DEBUG to enable debug logging, I get each of the debug log messages twice. This appears e.g. in the ArqLoggingLevelsTest test.
The ultimate reason is that LoggingFraction.applyDefaults(Level), which adds the logger to the WildFly logging subsystem, configures a handler for the logger. The thing is that by default, log messages are already sent to the parent's logger handlers, so in combination, the log message gets sent to 2 handers.
I see 2 possible options:
- remove the l.handler(CONSOLE) part
- add l.useParentHandlers(false)
I guess both of them have the same advantages and disadvantages, so I'll just send a PR with the first solution (which is how adding loggers is typically done in WildFly).