title: Log4j:how to define a common layout and ConversionPattern for multiple appenders
body: <p>I have multiple appenders in my <code>log4j</code> config, and I was wondering whether it would be possible to <strong>define the layout and conversion pattern once for all of them</strong>.
  I.e. I have</p>
  
  <pre><code>log4j.appender.CA=org.apache.log4j.ConsoleAppender
  log4j.appender.CA.layout=org.apache.log4j.PatternLayout
  log4j.appender.CA.layout.ConversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n
  
  log4j.appender.FA=org.apache.log4j.RollingFileAppender
  log4j.appender.FA.MaxBackupIndex=0
  log4j.appender.FA.MaxFileSize=100Mb
  log4j.appender.FA.File=log/my.log
  log4j.appender.FA.layout=org.apache.log4j.PatternLayout
  log4j.appender.FA.layout.ConversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n
  </code></pre>
  
  <p>and I'd like to know if and how I could define the last two rows of each appender's config only once.</p>