FileAppender writes the Header again when an existing LogFile exists. FileAppender should write the header only once per file (functionality not documented). If so, the method writeHeader should check whether the file is empty before writing a new header. If the file already contains data, no header should be written. Otherwise you could end up having multiple headers in your file (if you restart your JVM several times for instance). A fix could look like this: protected void writeHeader() { File logFile = new File(getFile()); if (layout != null && this.qw != null && logFile.length() == 0) { this.qw.write("my Header\n"); } }
http://logging.apache.org/log4j/1.3/index.html mentions log4j users should upgrade to the latest v2 Does this fix really need to take place in v1.3 since it looks like you already have a workaround for your current version?