Closed VitaliyMF closed 1 year ago
After reviewing code I find that this cannot be reproduced because HandleFileError
comes in FileLoggerOptions
which is passed in FileLoggerProvider
constructor and initialized before FileWriter.OpenFile
so it will be used even on the first log file open.
From https://github.com/nreco/logging/issues/57#issuecomment-1753309361_
FileWriter.OpenFile
uses "HandleFileError" when it is defined, however at the time of FileLoggerProvider creation (when log file is opened for the first time) this handler is not initialized yet. To fix this it would be enough to postpone log file open and open it only after initialization.