1 Reply Latest reply on Sep 19, 2011 3:00 AM by jaikiran pai

    jboss 7 log4j-appender

    vamshi appala Newbie

      we have customized the jboss 6 jboss-logging.xml to write the logging information into database.Below is the configuration defined in AS6

       

      <log4j-appender name="DBAppender" class="org.apache.log4j.jdbc.JDBCAppender">
            <error-manager>
               <only-once/>
            </error-manager>
        
         <level name="INFO"/>  
         <properties>
            <property name="URL">jdbc:postgresql://localhost:5432/data</property>
         <property name="driver">org.postgresql.Driver</property>
         <property name="user">admin</property>
         <property name="password">admin</property>
         </properties>
        
         <formatter>
               <pattern-formatter pattern="insert into Log values (current_timestamp,'%c', '%t','%p','%m')" />
            </formatter>  
         </log4j-appender>

       
        
         <log4j-appender name="FileAppender" class="org.apache.log4j.DailyRollingFileAppender">
            <error-manager>
               <only-once/>
            </error-manager>

            <level name="INFO"/>
            <properties>
               <property name="file">${jboss.server.log.dir}/data.log</property>
               <property name="append">true</property>
               <property name="datePattern">'.'yyyy-MM-dd</property>
            </properties>

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

            <loggers>
               <logger category="com.test.abc" />
            </loggers>
         </log4j-appender>

      How can I configure similar information AS7?