title: How to add timestamp to the log file name when we are using size based log files in log4j?
body: <p>I want to create size based log files. I am setting the following entry in the log4j.properties file:</p>
  
  <pre><code>log4j.appender.UserFileAppenderDebug=org.apache.log4j.RollingFileAppender
  
  log4j.appender.UserFileAppenderDebug.Threshold=TRACE
  
  log4j.appender.UserFileAppenderDebug.File=../log/coordinator-debug.log
  
  log4j.appender.UserFileAppenderDebug.MaxFileSize=1KB
  
  log4j.appender.UserFileAppenderDebug.MaxBackupIndex=7
  
  log4j.appender.UserFileAppenderDebug.layout=org.apache.log4j.PatternLayout
  
  log4j.appender.UserFileAppenderDebug.layout.ConversionPattern=%m%n
  </code></pre>
  
  <p>multiple log files are created based on size but with following names:</p>
  
  <pre><code>-rw-r--r-- 1 root root   32 Aug  6 11:28 coordinator-debug.log
  
  -rw-r--r-- 1 root root 1.1K Aug  6 11:28 coordinator-debug.log.1
  
  -rw-r--r-- 1 root root 1.1K Aug  6 11:28 coordinator-debug.log.2
  
  -rw-r--r-- 1 root root 1.2K Aug  6 11:28 coordinator-debug.log.3
  
  -rw-r--r-- 1 root root 1.1K Aug  6 11:28 coordinator-debug.log.4
  
  -rw-r--r-- 1 root root 1.1K Aug  6 11:28 coordinator-debug.log.5
  
  -rw-r--r-- 1 root root 1.1K Aug  6 11:28 coordinator-debug.log.6
  
  -rw-r--r-- 1 root root 1.1K Aug  6 11:28 coordinator-debug.log.7
  </code></pre>
  
  <p>I would like to have the file name as follows</p>
  
  <pre><code>coordinator-debug.log.2013-08-01 11:28:39, 232
  </code></pre>
  
  <p>I would appreciate if you please share your comments/suggestions.</p>
  
  <p>Thanks.</p>