I think we should try to create the directory, not even define an option. If it fails (because it is not allowed), we could catch the exception, then write out an error message and one is no worse off then if we never tried in the first place. This just seems basic to me. Jake had to write too much code in the log4j init servlet code to make sure the directory exists before initializing a file appender, etc. I'd be willing to fix this as a bug in 1.2.12.
-Mark > -----Original Message----- > From: Curt Arnold [mailto:[EMAIL PROTECTED] > Sent: Friday, June 17, 2005 2:23 PM > To: Log4J Users List > Subject: Re: Creating the directory Automatically > > See http://issues.apache.org/bugzilla/show_bug.cgi?id=9150. > > There appear to be valid reasons why could be undesirable for an > appender to create directories if they are not available. However, > it may be desirable to provide an option that would allow you to > specify that you want the appender to try. > > On Jun 17, 2005, at 2:24 AM, Taranbir I Singh wrote: > > > HI, > > > > I have defined the log file as "c:\temp\test.log", if the directory > > c:\temp is not already existing then its giving me the error... is > > this > > possible to create the directory if it is not there automatically? > > > > > > Any Solutions? > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
