title: Declaring a custom appender in Log4j.xml file
body: <p>I have written a custom appender so how do i declare it in Log4j.xml file.</p>
  
  <pre><code>My property file is[custom appender is in org.copofi.common.logging.SystemStatusAppender] :
  
      log4j.rootLogger=INFO,logfile,console,SystemStatus
      log4j.logger=INFO,logfile,console,SystemStatus
  
      # Console appender (stdout)
      log4j.appender.console=org.apache.log4j.ConsoleAppender
      log4j.appender.console.layout=org.apache.log4j.PatternLayout
      log4j.appender.console.layout.ConversionPattern=[%d{yy-MM-dd HH:mm:ss.SSS}] [%p] &lt;%t&gt; [%X{jsessionId}] [%c] %m%n
  
      # File appender
      log4j.appender.logfile=org.apache.log4j.FileAppender
      log4j.appender.logfile.File=${catalina.base}/logs/copofi.log
      log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
      log4j.appender.logfile.layout.ConversionPattern=[%d{yy-MM-dd HH:mm:ss.SSS}] [%p] &lt;%t&gt; [%X{jsessionId}] [%c] %m%n
  
      log4j.appender.SystemStatus=org.copofi.common.logging.SystemStatusAppender
  </code></pre>