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 "Huber, Christian" <Ch...@spls.siemens.com> on 2001/12/21 01:56:03 UTC

Can not create file! Help please!

Hi,
I am a newbie in log4j as well as programming Java. I hope, that anybody can
tell me, what I am doing wrong. I try to create a rolling file appender, but
my file won't be created :-( Here is my property file:

log4j.category=DEBUG, fileApp
log4j.appender.fileApp=org.apache.log4j.RollingFileAppender
log4j.appender.fileApp.File=logs.log
log4j.appender.fileApp.MaxFileSize = 10MB
# Keep one backup file
log4j.appender.fileApp.MaxBackupIndex =2
log4j.appender.fileApp.layout=org.apache.log4j.PatternLayout
log4j.appender.fileApp.layout.ConversionPattern=%-5p %d [%t]: %m %n

And here is the code:
      FileInputStream fstream = new
FileInputStream("c:\\temp\\proper.prop");
      Properties append = new Properties();
      append.load(fstream);
      String myApp = append.getProperty("Appender");
      System.out.println(myApp);
      PropertyConfigurator.configure();

I would really appreciate it, if somebody could help me asap.

Thanks in advance! Chris

Christian Huber
Siemens Procurement and Logistics Services, LLC
c2p Operations - click2procureSM

4900 Old Ironsides Drive, Bldg.1
Mailstop 100
Santa Clara, CA 95054, USA
Tel.:  (408) 764-9223	Fax: (408) 764-9210

E-mail: christian.huber@spls.siemens.com
Siemens e-Procurement Solution/Buy-Side Marketplace:
<http://www.click2procure.com>
Be part of Siemens Suppliers? Suppliers Registration:
<http://click4suppliers.siemens.com> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>