5.3.2. Add Per-deployment Logging to an Application


To configure per-deployment logging, add the logging configuration file logging.properties into the deployment. This configuration file is recommended because it can be used with any logging facade as the JBoss Log Manager is the underlying log manager used.
If you are using Simple Logging Facade for Java (SLF4J) or Apache log4j, the logging.properties configuration file is suitable. If you are using Apache log4j appenders then the configuration file log4j.properties is required. The configuration file jboss-logging.properties is supported only for legacy deployments.

Procedure 5.1. Add Configuration File to the Application

  • The directory into which the configuration file is added depends on the deployment method: EAR, WAR or JAR.

    • EAR deployment

      Copy the logging configuration file to the META-INF directory.
    • WAR or JAR deployment

      Copy the logging configuration file to either the META-INF or WEB-INF/classes directory.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.