Since Java 7 two methods are available to open new files:
While they mostly perform the same OS operations, there is a significant difference between the two on Windows: the IO method opens the file without the FILE_SHARE_DELETE option, whereas the NIO method adds the FILE_SHARE_DELETE option (cf. this SO question).
Since log files on UNIX can already be deleted without stopping the application, this change would allow an alignment between the behavior of Log4j on Windows and UNIX.
I discussed this with @garydgregory on Slack.
Since Java 7 two methods are available to open new files:
FileOutputStream#new,Files#newOutputStream.While they mostly perform the same OS operations, there is a significant difference between the two on Windows: the IO method opens the file without the
FILE_SHARE_DELETEoption, whereas the NIO method adds theFILE_SHARE_DELETEoption (cf. this SO question).Since log files on UNIX can already be deleted without stopping the application, this change would allow an alignment between the behavior of Log4j on Windows and UNIX.
I discussed this with @garydgregory on Slack.