Skip to content

Commit

Permalink
* Explicitly specifying FileShare.Read option when opening the file s…
Browse files Browse the repository at this point in the history
…tream
  • Loading branch information
zoka-ml committed Oct 15, 2024
1 parent d3aa864 commit b72a6a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NReco.Logging.File/FileLoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void createLogFileStream(bool append) {
// so there is no need for a "manual" check first.
fileInfo.Directory.Create();

LogFileStream = new FileStream(LogFileName, FileMode.OpenOrCreate, FileAccess.Write);
LogFileStream = new FileStream(LogFileName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read);
if (append) {
LogFileStream.Seek(0, SeekOrigin.End);
} else {
Expand Down

0 comments on commit b72a6a4

Please sign in to comment.