1 2 Previous Next 15 Replies Latest reply on Jun 22, 2013 9:33 AM by Alex Alvarez

    Logging in JBoss AS 7.1.3.Final within EAR

    Frank Cornelis Apprentice



      There seems to be something wrong with logging from within an EAR. Sometimes it works, sometimes it doesn't. And I cannot seem to find a pattern when and when not.

      I've tried different logging frameworks: commons-logging, jboss-logging, java logging.

      Creating an EAR with a WAR containing a servlet gives me logging as expected. I.e., I create the following within standalone-full.xml subsystem xmlns="urn:jboss:domain:logging:1.1":

                   <periodic-rotating-file-handler name="MYLOGGER">
                      <level name="DEBUG"/>
                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                      <file relative-to="jboss.server.log.dir" path="mylogger.log"/>
                      <suffix value=".yyyy-MM-dd"/>
                      <append value="true"/>
                  <logger category="my.package" use-parent-handlers="false">
                      <level name="DEBUG"/>
                          <handler name="MYLOGGER"/>


      When using:


      Log LOG = LogFactory.getLog(MyServlet.class);
      LOG.debug("hello world");


      I indeed get "hello world" within "mylogger.log". But doing the same from within a CDI or EJB3 bean doesn't give me any logging at all. Logging from within the model EJB JAR doesn't work either.


      Anyone else experiencing weird logging behaviour when using an EAR setup?


      Already played with several jboss-deployment-structure.xml configs, nothing seems to give the expected behaviour.

        1 2 Previous Next