Dan,

Log4j does not attempt to prevent the user from shooting herself in the foot. It does 
not create directories if they to not exist. It does not fall back to the console when 
the network connection is down. It does not float to heaven in case the computer 
catches fire. 

If you are interested in any of these behaviors, except perhaps the last, you can 
achieve it by attaching an error handler to the amender that you would like to render 
fail-safe. The error handler could create the directory if it wanted to. Cheers, Ceki

At 10:38 07.03.2001 -0600, Dan B. Tanner wrote:
>Doh! for me....that works.  Thanks guys.
>
>This turns the email into a dev topic now, but that sounds like a good idea to create 
>the directory if it doesn't already exist.  I can't see any reason why you wouldn't 
>want to do it - you don't even have to worry about checking the append attribute 
>either, since you would know you're not overwriting anything.  If it's not in the 
>latest source code already, I'll try adding it.
>
>
>>>> "Wes" <[EMAIL PROTECTED]> 03/07/01 10:21AM >>>
>Is that directory (dude) present?
>
>I'm doing the same, and although I didn't notice the error (because it went
>to system.out), I did notice that I wasn't getting any log files created.
>When I created the subdirectory, it worked.
>
>Maybe the creation of the directory, if it isn't present on the filesystem,
>could be added to this appender...
>
>I'm doing this in some other code, it's as simple as this:
>      if (!outputDir.exists()) {
>         outputDir.mkdirs();
>      }
>
>Wes
>
>----- Original Message -----
>From: "Dan B. Tanner" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, March 07, 2001 9:24 AM
>Subject: specify path in File param on windows?
>
>
>Has anyone else had problems on windows NT specifying a path in the File
>parameter of an appender?
>For example, if I try the following code in a config file:
><appender name="foo" class="bar">
>  <param name="File" value="logs/blah.log" />
>....
>I get the following error:
>
>log4j:ERROR setFile(null,true) call failed.
>java.io.FileNotFoundException: dude/siteUsage.log (The system cannot find
>the pathen specified)
>-------------
>Things work fine if I just specify a filename in the value attribute.
>I'm using version 1.0.4.  I didn't see any bug fixes about this mentioned in
>the HISTORY of version 1.1b1, so I thought I'd ask first to see if this
>really is a problem.
>
>Thanks,
>[EMAIL PROTECTED] 
>
>
>
>
>**********************************************************************
>This email and any files transmitted with it are confidential and
>intended solely for the use of the individual or entity to whom they
>are addressed. If you have received this email in error please notify
>the system manager.
>**********************************************************************
>
>---------------------------------------------------------------------
>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]

----
Ceki Gülcü          Web:   http://qos.ch      
av. de Rumine 5     email: [EMAIL PROTECTED] (preferred)
CH-1005 Lausanne           [EMAIL PROTECTED]
Switzerland         Tel: ++41 21 351 23 15


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to