3 Replies Latest reply on Jun 27, 2014 12:49 AM by Raama N

    Logger is not working in jboss-as-7.1.1.Final

    Raama N Newbie

      I have created new handler and a logger. The file alerts.log is created in log folder of server but logs are not appending to this file even while execution of that package i given in  category("com.myapp") can u let me know any suggestions

       

      This is the logging subsystem in standalone.xml.

       

      <subsystem xmlns="urn:jboss:domain:logging:1.1">

                  <console-handler name="CONSOLE" autoflush="true">

                      <level name="INFO"/>

                      <formatter>

                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p %s%E%n"/>

                      </formatter>

                  </console-handler>

                  <periodic-rotating-file-handler name="FILE">

                      <formatter>

                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p %s%E%n"/>

                      </formatter>

                      <file relative-to="jboss.server.log.dir" path="server.log"/>

                      <suffix value=".yyyy-MM-dd"/>

                      <append value="true"/>

                  </periodic-rotating-file-handler>

                 <periodic-rotating-file-handler name="ALERTS">

                      <level name="INFO"/>

                      <formatter>

                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n"/>

                      </formatter>

                      <file relative-to="jboss.server.log.dir" path="alerts.log"/>

                      <suffix value=".yyyy-MM-dd"/>

                      <append value="true"/>

                  </periodic-rotating-file-handler>

                  <logger category="com.arjuna">

                      <level name="WARN"/>

                  </logger>

                  <logger category="org.apache.tomcat.util.modeler">

                      <level name="WARN"/>

                  </logger>

                  <logger category="sun.rmi">

                      <level name="WARN"/>

                  </logger>

                  <logger category="jacorb">

                      <level name="WARN"/>

                  </logger>

                  <logger category="jacorb.config">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="org.jboss">

                      <level name="INFO"/>

                  </logger>

                  <logger category="com.myapp" use-parent-handlers="false">

                      <level name="INFO"/>

                      <handlers>

                          <handler name="ALERTS"/>

                      </handlers>

                  </logger>

                  <root-logger>

                      <level name="INFO"/>

                      <handlers>

                          <handler name="CONSOLE"/>

                          <handler name="FILE"/>

                      </handlers>

                  </root-logger>

              </subsystem>

       

      Thanks.