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 Rajan Annadurai <ra...@LEAPSTONE.com> on 2002/06/02 03:02:24 UTC

extended FileAppenders to create the file directory

Has anybody extended FileAppenders to create the file directory if it
does not exist? 

Help would be appreciated.

Thanx,
Rajan

-----Original Message-----
From: Thomas Tuft Muller [mailto:ttm@online.no] 
Sent: Thursday, May 30, 2002 2:14 PM
To: Log4J Users List
Subject: RE: java.io.FileNotFoundException: /LOG/temp.log (The system
cannot find the path specified)

You have to code it yourself.

--

Thomas

| -----Original Message-----
| From: Rajan Annadurai [mailto:rannadurai@LEAPSTONE.com]
| Sent: 30 May 2002 19:08
| To: log4j-user@jakarta.apache.org
| Subject: java.io.FileNotFoundException: /LOG/temp.log (The system
cannot
| find the path specified)
| 
| 
| Hi ,
| 
|  
| 
| RollingFileAppender peAppender = new
| RollingFileAppender(defaultPattern,"/LOG/temp.log",true);
| 
|  
| 
| The above line throws java.io.FileNotFoundException if the directory
is
| not present. How do you make log4j create the directory if it is not
| present?
| 
|  
| 
| Thanx,
| 
| Rajan
| 
| 


************************************************************************
*
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights
reserved. 
The information supplied in this email should be treated in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

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


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