Skip to content
Commit 0637d22c authored by Tony Trinh's avatar Tony Trinh
Browse files

Fix exception when threads write files to same dir

When Multiple FileAppenders attempt to write files to the same
nonexistent directory, concurrent threads could attempt to create
the directory at the same time, where only one succeeds, while
the others hit an IllegalStateException. This patch modifies
FileUtil.createMissingParentDirectories() to gracefully handle
existing directories (no exceptions thrown).

This patch also removes FileUtil.isParentDirectoryCreationRequired()
as this allows for race conditions between the existence-check and
the directory creation. Note that File.mkdirs() already performs
an existence-check.

Fixes LOGBACK-128
parent 0c26c814
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment