0 Replies Latest reply on Jan 10, 2012 5:26 AM by Sumeeth Tewar

    JBOSS AS 6.1.0 final : log4j application is not logging.

    Sumeeth Tewar Newbie

      Hi,

       

      i have an jboss 4.2.3 application which was logging perfectly alrite to a log file other than server.log.

      but since i have shifted to jboss 6.1.0 final, the application cannot log to the specified file,

      i used to place the log4j.xml to server/conf directory earlier

      but now since jboss logging is introduced in JBOSS AS 6.0,  jboss-logging.xml has been introduced.

       

      Can anyone help me how to define the following configuration in jboss-logging.xml.

      i cannot find how to get the <layout> working in jboss-logging.xml,

       

      for appender :

      <appender class="org.apache.log4j.RollingFileAppender" name="XYZDebugAppender">

                                         <param name="Threshold" value="ERROR#com.example.logging.client.LogLevel"/>

                                         <param name="File" value="/var/log/example/logScheduler.log"/>

                                     <param name="MaxFileSize" value="1000KB"/>

                                     <param name="MaxBackupIndex" value="10"/>

      <layout class="com.example.client.CommonLoggingLayout">

                    <param name="Throwable" value="true"/>

                                               <param name="LocalizedMessage" value="true"/>

                                                <param name="DisplayPathOnDebug" value="true"/>

                                        <param name="Facility" value="1"/>

      </layout>

      </appender>

       

       

      for category :

       

      <category name="com.example.category.debug">

          <level value="ERROR#com.example.client.LogLevel"/>

            <appender-ref ref="XYZDebugAppender"/>

         </category>

       

      for logger :

       

      <logger name="com.example.console.tracelogger">

      <level value="ERROR#com.example.client.LogLevel"/>

            <appender-ref ref="XYZDebugAppender"/>

      </logger>

       

      Also please let me know, if there is any application guide for JBOSS AS 6.0?