Add support for logdir/logformat