Menu

#30 RollingFileAppender - Logfile in non-existing directory.

v1.2.0
open
General (51)
5
2003-03-25
2003-03-25
Taco
No

(log4net v1.1.1 and v1.2)
In my configfile I set
<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
<param name="File"
value="D:\\Logfiles\\MyApp\\MyLog.txt" />

If the directory D:\Logfiles\MyApp exists, there's no
problem; but if it's not there, it is not created by log4net
and my logging cannot be written.

I expected that the FileAppender creates the
logdirectory if it is not-existing.

Is this a bug or a feature request?

With kind regards,
Taco.

Discussion

  • Nicko Cadell

    Nicko Cadell - 2003-03-25
    • milestone: --> v1.2.0
     
  • Nicko Cadell

    Nicko Cadell - 2003-03-25

    Logged In: YES
    user_id=278872

    If the process has permission to create the directory then it
    will be created. If it does not then it cannot be created. This
    behaviour should not have changed in the 1.2.0 releases.

     
  • Nobody/Anonymous

    Logged In: NO

    In my experience (I'm using the next-to-last beta release), it
    does not create the directory path, even if the permissions
    are adequate.
    This is a rather grave limitation, as creating the directories
    becomes an application deployment issue.
    It's good to see this was considered earlier in Log4NET. It
    does not appear to work at the moment, however.

     

Log in to post a comment.