How to write only server startup message to specific log file ?

Solution Verified - Updated -

Issue

  • We are currently running on JBoss EAP 4 and we have our jboss-log4j.xml setup to direct startup output to a separate log file (my_status.log). This allows us to automate detection of server startup.

We are migrating to JBoss EAP 6.2.0 and wish to replicate this functionality.

<appender name="MY-FILE" class="org.apache.log4j.FileAppender">
    <param name="File" value="${jboss.server.home.dir}/log/my_status.log"/>
    <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d %-5r %-5p [%c].%M %m%n"/>
    </layout>
  </appender>

<category name="org.jboss.system.server.Server" additivity="true">
    <priority value="INFO"/>
    <appender-ref ref="MY-FILE"/>
  </category>

In JBoss EAP 4 we can specify "org.jboss.system.server.Server" in the logging configuration. What can we use in EAP 6.2 to accomplish the same thing?

Environment

  • RedHat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.