1 Reply Latest reply on Apr 15, 2011 2:00 AM by jaikiran pai

    log4j-appender datasource

    Marcos Almeida Newbie

      Hello, i have an issue using jboss-logging.xml. we made an upgrade to 6.0.0 just in this project, but i can't save log into server.

       

      my old file was:

       

      <appender name="mclipping_database_appender" class="org.jboss.logging.appender.DatasourceAppender" >

              <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>

                <param name="datasource" value="java:/mcontent" />

                <layout class="org.apache.log4j.PatternLayout">

                     <param name="conversionPattern" value="INSERT INTO systemlog (date, type, remoteHost, userLogin, userFullName, userEmail, funcionality, operation, idAccount) VALUES ('%d{yyyy-MM-dd HH:mm:ss}','%p','%X{remoteHost}','%X{userLogin}','%X{userFullName}','%X{userEmail}','%X{funcionality}','%m',%X{account})" />

                </layout>

           </appender>

       

          <category name="mclipping">

              <priority value="DEBUG" />

           <appender-ref ref="mclipping_database_appender" />

          </category>

       

      my new file is:

       

      <log4j-appender name="mclipping_database_appender" class="org.jboss.logging.appender.DatasourceAppender" >      

                      <error-manager>

                         <only-once/>

                      </error-manager>

                <properties>

                     <property name="datasource">java:/mcontent</property>

                </properties>

                <formatter>

                     <pattern-formatter pattern="INSERT INTO systemlog (date, type, remoteHost, userLogin, userFullName, userEmail, funcionality, operation, idAccount) VALUES ('%d{yyyy-MM-dd HH:mm:ss}','%p','%X{remoteHost}','%X{userLogin}','%X{userFullName}','%X{userEmail}','%X{funcionality}','%m',%X{account});" />

                </formatter>

           </log4j-appender>

       

          <logger category="mclipping">

              <level name="DEBUG" />

           <handlers>

                <handler-ref name="mclipping_database_appender" />

           </handlers>

          </logger>

       

      is there anything wrong?