0 Replies Latest reply on Nov 24, 2011 3:10 AM by Kavan Desai

    Need help for application specific logging in JBOSS AS 6.1.0 Final

    Kavan Desai Newbie

      Hi,

       

      I am trying to configure application specific logging in JBOSS AS 6.1.0 final.I have deployed my application is an ear which contains a war and an a jar.

      I have created the jboss-logging.xml this:

      <?xml version="1.0" encoding="UTF-8"?>

      <logging xmlns="urn:jboss:logging:6.0" xmlns:b="urn:jboss:bean-deployer:2.0" context="myapp">

       

         <define-context name="myapp" />

       

         <periodic-rotating-file-handler

               file-name="${jboss.server.log.dir}/myapp.log"

               name="myappApp"

               autoflush="true"

               append="true"

               suffix=".yyyy-MM-dd">  <!-- To roll over at the top of each hour, use ".yyyy-MM-dd-HH" instead -->

            <error-manager>

               <only-once/>

            </error-manager>

            <formatter>

               <pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>

            </formatter>

         </periodic-rotating-file-handler>

         <logger category="org.jboss">

            <level name="TRACE"/>

         </logger>

       

         <logger category="org.myapp">

            <level name="TRACE"/>

         </logger>

       

          

         <root-logger>

       

           

            <!-- Set the root logger priority via a system property, with a default value. -->

            <level name="${jboss.server.log.threshold:INFO}"/>

            <handlers>

               <handler-ref name="myappApp"/>

            </handlers>

         </root-logger>

       

      </logging>

       

      I have placed it inside META-INF of ear file.On server start up the myapp.log is getting created however it remains empty.All log statements were getting logged in sever.log only.

       

      I have tried the suggestion from this post also however the hibernate related logg messages are going in server.log only.

       

      Am I missing something?