ppkarwasz opened a new issue, #2117: URL: https://github.com/apache/logging-log4j2/issues/2117
Since Java 7 two methods are available to open new files: - [`FileOutputStream#new`](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/FileOutputStream.html), - [`Files#newOutputStream`](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/Files.html#newOutputStream(java.nio.file.Path,java.nio.file.OpenOption...)). 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](https://stackoverflow.com/q/63584311/11748454)). 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
