Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 5229 invoked from network); 2 Mar 2004 23:00:45 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Mar 2004 23:00:45 -0000 Received: (qmail 29493 invoked by uid 500); 2 Mar 2004 23:00:23 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 29385 invoked by uid 500); 2 Mar 2004 23:00:22 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 29260 invoked from network); 2 Mar 2004 23:00:21 -0000 Received: from unknown (HELO md2-smtp.kp.org) (162.119.241.4) by daedalus.apache.org with SMTP; 2 Mar 2004 23:00:21 -0000 Received: from ktazp599.kp.org ([172.21.128.153]) by md2-smtp.kp.org (8.12.10/8.12.10) with ESMTP id i22MfHun002470 for ; Tue, 2 Mar 2004 18:01:19 -0500 (EST) Received: from crdc-gwy01.crdc.KP.ORG by ktazp599 with ESMTP for log4j-user@logging.apache.org; Tue, 2 Mar 2004 14:57:41 -0800 To: log4j-user@logging.apache.org Subject: Re: Log4j problem with Rolling file appender! MIME-Version: 1.0 X-Mailer: Lotus Notes Release 5.0.8 June 18, 2001 Message-Id: From: Narasimha.Naidu@kp.org Date: Tue, 2 Mar 2004 14:57:39 -0800 X-MIMETrack: Serialize by Router on CRDC-GWY01/GSVR/KAIPERM(Release 5.0.11 |July 24, 2002) at 03/02/2004 02:57:41 PM, Serialize complete at 03/02/2004 02:57:41 PM Content-Type: multipart/alternative; boundary="=_alternative 007E20F488256E4B_=" X-KP: PPSAV - [172.21.128.153] - 2004-03-02 - 17:58:10 X-Proofpoint-Spam-Score: : 0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --=_alternative 007E20F488256E4B_= Content-Type: text/plain; charset="us-ascii" Pradeep, Thanks a lot for your quick response. I am getting this problem in production which runs on AIX. I don't think so it is OS specific. And, it is not happening always. The application is running since 2 years. I have seems these two problems only couple of times. I guess, it is happening in a particular scenario and couldn't figure that. Thanks. "Pradeep Kanwar" 03/02/2004 02:38 PM Please respond to "Log4J Users List" To: "Log4J Users List" cc: Subject: Re: Log4j problem with Rolling file appender! Hi Naidu, You code runs fine on a standalone app on win2k m/c with log4j-1.2.8. It has to be something with your webapp/websphere setting. -pradeep kanwar ps: your properties file with a basic prog *******BasicReadFileProperties.properties********** log4j.category.sca.kpol=ERROR, HL7_APPENDER_SCA log4j.additivity.sca.kpol=false log4j.appender.HL7_APPENDER_SCA=org.apache.log4j.RollingFileAppender log4j.appender.HL7_APPENDER_SCA.File=hl7_rxrefill_sca.log log4j.appender.HL7_APPENDER_SCA.MaxFileSize=10KB log4j.appender.HL7_APPENDER_SCA.MaxBackupIndex=1 log4j.appender.HL7_APPENDER_SCA.layout=org.apache.log4j.PatternLayout log4j.appender.HL7_APPENDER_SCA.layout.ConversionPattern=%d{ISO8601} %-5p - %m%n *****BasicReadFileProperties.java************ import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; /** * @author pkanwar@secf.com * Mar 2, 2004 * TODO: put class desc here */ public class BasicReadPropertyFile { public void logTest(){ System.out.println("log testing starts...."); //read properties PropertyConfigurator.configure("C:\\projects\\lab\\BasicReadPropertyFile.pro perties"); //create logger instance //Logger l = Logger.getLogger("BasicReadPropertyFile.class"); Logger l = Logger.getLogger("sca.kpol"); //log data for(int i=0; i<10000 ;i++){ l.debug("debug"); l.info("info"); l.warn("warn"); l.error("error"); l.fatal("fatal"); } } public static void main(String[] args) { BasicReadPropertyFile brpf = new BasicReadPropertyFile(); brpf.logTest(); } } ******************** ----- Original Message ----- From: To: Sent: Tuesday, March 02, 2004 12:58 PM Subject: Re: Log4j problem with Rolling file appender! > Hi, > > We are currently using log4j-1.2.7 and deployed as a web application in > WebSphere > application server. The setting for the Rolling File Appender is > > log4j.category.sca.kpol=ERROR, HL7_APPENDER_SCA > log4j.additivity.sca.kpol=false > log4j.appender.HL7_APPENDER_SCA=org.apache.log4j.RollingFileAppender > log4j.appender.HL7_APPENDER_SCA.File=/logs/kporg/rxrefill/hl7_rxrefill_sca.l og > log4j.appender.HL7_APPENDER_SCA.MaxFileSize=100KB > log4j.appender.HL7_APPENDER_SCA.MaxBackupIndex=1 > log4j.appender.HL7_APPENDER_SCA.layout=org.apache.log4j.PatternLayout > log4j.appender.HL7_APPENDER_SCA.layout.ConversionPattern=%d{ISO8601} %-5p > - %m%n > > I am getting the following errors with this current setting, with the > log4j backup file. > > 1. Wiping out the backup file: After log4j has taken the backup when the > size is reached over 100KB, the size of hl7_rxrefill_sca.log.1 is 0KB. > This is not happening always. But, I can't figure out the reason why it is > wiping out the contents. > 2. Another weird behavior. Log4j is updating both the original file and > back up file simultaneously once the back up has taken. > > Appreciate you help. > Naidu > > --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org --=_alternative 007E20F488256E4B_=--