[logback-dev] [Bug 137] 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:44:07 CET 2008


------- Comment #1 from bruno.navert at morganstanley.com  2008-03-20 16:44 -------
This subclass does the trick, but an option in FileAppender would be much
better (I used RollingFileAppender because this is what I needed in my

public class DirectoryCreateRollingFileAppender<E> extends
    public synchronized void setFile() throws IOException
        // create parent directories as needed
        new File( fileName ).getParentFile().mkdirs();

        // then proceed as usual

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