logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bong@ucdavis.edu" <b...@ucdavis.edu>
Subject outputting header twice for RollingFileAppender
Date Tue, 10 Nov 2009 20:53:06 GMT

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


Mime
View raw message