[logback-dev] [Bug 137] New: add option to FileAppender to auto-create parent directories

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Thu Mar 20 16:29:40 CET 2008


http://bugzilla.qos.ch/show_bug.cgi?id=137

           Summary: add option to FileAppender to auto-create parent
                    directories
           Product: logback-core
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Appender
        AssignedTo: logback-dev at qos.ch
        ReportedBy: bruno.navert at morganstanley.com


FileAppender should be able to automatically create parent directories as
needed when writing the log file.

For instance, if configured with
<File>/var/tmp/project_name/some_file.log</File>, and the new option set to
true (suggest <CreateParentDirectories>true</CreateParentDirectories> maybe),
then in FileAppender.setFile(), it should do

new File( fileName ).getParentFile().mkdirs()

workaround is to create the directory before initializing logback. Possible but
far less than ideal, and rather complicated too


-- 
Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the logback-dev mailing list