logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anshu Garg1" <anshug...@in.ibm.com>
Subject Using log4j1.2.17 foter is not getting added to each log file in rollingfileappender
Date Tue, 05 Jan 2016 06:14:06 GMT
Hi,

We have extended patternlayout to set custom footer and header. Now when 
we use this pattern in rolling file appender footer is only added to last 
log file generated while header is added to all files. Our requirement is 
to have footer also added to files created. Any suggestion? Here is the 
snippet. 

Logger logger = Logger.getLogger("myLogger");
CustomPattern pattern = new CustomPattern();
pattern.setHeader("HeaderText");
pattern.setFooter("FooterText");
rollingFileAppender.setLayout(pattern);

-Thanks & Regards,
Anshu Garg
Platform Technology Center, India

Phone: 8800096760
E-mail: anshugarg@in.ibm.com 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message