ConfigCat SDK for .NET. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
In this PR I fixed a file locking issue with FileSystemWatcher. The watcher doesn't really care about whether the write is finished or not on a file that is changed, so our current reload function could easily fail on trying to open a locked file.
A lock-check loop was introduced to give the reload functionality more chance to open the file if it's being unlocked within 10s of trying.
I also made some consolidation around the LogLevel, it was kinda confusing as it was defined on both the LoggerWrapper and ConsoleLogger at the same time but it was just used on the LoggerWrapper really. Now the wrapper is only proxying the underlying ILogger's LogLevel.
Requirement checklist (only if applicable)
[x] I have covered the applied changes with automated tests.
[x] I have executed the full automated test set against my changes.
[x] I have validated my changes against all supported platform versions.
Describe the purpose of your pull request
In this PR I fixed a file locking issue with
FileSystemWatcher
. The watcher doesn't really care about whether the write is finished or not on a file that is changed, so our current reload function could easily fail on trying to open a locked file. A lock-check loop was introduced to give the reload functionality more chance to open the file if it's being unlocked within 10s of trying.I also made some consolidation around the
LogLevel
, it was kinda confusing as it was defined on both theLoggerWrapper
andConsoleLogger
at the same time but it was just used on theLoggerWrapper
really. Now the wrapper is only proxying the underlying ILogger'sLogLevel
.Requirement checklist (only if applicable)