My applications are only used within our company and I have one common log file on a shared drive. I want to log each use of my desktop applications for statistics and also log errors thrown.
Also the users should not be able to open the log files and parent folders.
Therefore the log file and parent folders are set to write-only permission:
Serilog is not writing to that write-only log file.
With Serilog.Debugging.SelfLog.Enable(...)
I can observe Serilog has a problem with the permissions set:
Before I knew Serilog I was writing logs to the same write-only folders with StreamWriter.WriteLine()
or File.AppendText()
.
=> Both methods write logs to the write-only folders/files without problems.
Could it be, that Serilog is checking read-permissions before writing?
Is there a setting enabling Serilog to write to a write-only file?