3 Replies Latest reply on Apr 21, 2015 10:45 AM by Thomas Becker

    Wildfly duplicate logs

    lukas lukasz Newbie

      I have got problem with setting wildfly logger.properties i add my own file handler and there is a setting:

       

      <subsystem xmlns="urn:jboss:domain:logging:2.0">
        <console-handler name="CONSOLE">
        <level name="INFO"/>
        <formatter>
        <named-formatter name="COLOR-PATTERN"/>
        </formatter>
        </console-handler>
        <periodic-rotating-file-handler name="FILE" autoflush="true">
        <formatter>
        <named-formatter name="PATTERN"/>
        </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="MY_FILE" autoflush="true">
        <formatter>
        <named-formatter name="PATTERN"/>
        </formatter>
        <file relative-to="jboss.server.log.dir" path="test-file.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="org.jboss.as.config">
        <level name="DEBUG"/>
        </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="com.mypackage" >
        <level name="DEBUG"/>
      
        <handlers>
        <handler name="MY_FILE"/>
        </handlers>
        </logger>
        <root-logger>
        <level name="INFO"/>
        <handlers>
        <handler name="CONSOLE"/>
        <handler name="FILE"/>
        </handlers>
        </root-logger>
        <formatter name="PATTERN">
        <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
        </formatter>
        <formatter name="COLOR-PATTERN">
        <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
        </formatter>
        </subsystem>
      

       

      As you see i add MY_FILE handler and then i set com.mypackage to use that handler but i have got three logs in my file why, where is the reason of that situation :

       

      2015-03-24 18:45:05,257 INFO [com.mypackage.web.controllers.LoginController] (default task-8) ------------------------------
      2015-03-24 18:45:05,265 INFO [com.mypackage.web.controllers.LoginController] (default task-9) ------------------------------
      2015-03-24 18:45:05,279 INFO [com.mypackage.web.controllers.LoginController] (default task-10) ------------------------------
      

       

      Can you help me please