[logback-dev] [JIRA] Commented: (LBCORE-42) add option to FileAppender to auto-create parent directories

Rob Ross (JIRA) noreply-jira at qos.ch
Sun Jul 27 23:33:35 CEST 2008

    [ http://jira.qos.ch/browse/LBCORE-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10629#action_10629 ] 

Rob Ross commented on LBCORE-42:

I agree with the above. I just started using logback as a replacement for log4j, and this is the first big difference in  behavior that I have found. Please implement this functionality in logback. Thanks!

> add option to FileAppender to auto-create parent directories
> ------------------------------------------------------------
>                 Key: LBCORE-42
>                 URL: http://jira.qos.ch/browse/LBCORE-42
>             Project: logback-core
>          Issue Type: Bug
>          Components: Appender
>    Affects Versions: unspecified
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Bruno Navert
>            Assignee: Logback dev list
> 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

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the logback-dev mailing list