Search code examples
loggingspring-bootwildfly-swarm

Log levels configuration with Wildfly Swarm


When developping a Wildfly Swarm based application, how can i configure the logging levels using properties usable from the project-stages.yml?

In other words, what is the equivalent of the "logging.level.com.acme.rest=DEBUG" properties of Spring Boot?

Currently I know that:

  • "swarm.logging=DEBUG" can be used to configure all logging levels (not what i need)
  • A "standalone.xml" could be used but is not ops friendly enough
  • LoggingFraction can be used to programmatically configure the logging levels (also not what I need)
  • The documentation also mentions "logging.level" but I could not make it work so far

Thank you for your time


Solution

  • In your project-stages.yml you can define the Logging Levels (see Wildfly Swarm Reference Guide for a full list of all options):

    swarm:
      logging:
        loggers:
          com.acme.rest:
            level: DEBUG