You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "bong@ucdavis.edu" <bo...@ucdavis.edu> on 2009/11/10 21:53:06 UTC

outputting header twice for RollingFileAppender

Hi.  I have a RollingFileAppender where I’ve created a custom layout.  And,
in the custom layout, all I’m doing is adding a header row to my log file
(see below).

public class NoMatchingTranscriptPatternLayout extends PatternLayout {

      public NoMatchingTranscriptPatternLayout() {
            super();
      }
      
      public String getHeader() {
            return (new String("Date of Download\tPdf\n"));
      }
}

Now, I have a job that’s scheduled to run on a daily basis so the log files
get updated daily.  However, when the log file gets updated, the header gets
outputted to the log file each time the job is run.  I have log4j version
1.2.15.  Is this a bug?  Shouldn’t the header only get generated if the file
is new?  Please advise.  

Thanks

-- 
View this message in context: http://old.nabble.com/outputting-header-twice-for-RollingFileAppender-tp26289322p26289322.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org