in CredentialProvider.Microsoft/Logging/LogEveryMessageFileLogger.cs [25:49]
public void Log(LogLevel level, bool allowOnConsole, string message)
{
try
{
for (int i = 0; i < 3; ++i)
{
try
{
File.AppendAllText(
filePath,
$"[{DateTime.UtcNow:HH:mm:ss.fff} {Pid,5} {GetLevelKeyword(level),7}] {message}\n");
return;
}
catch (IOException)
{
// retry IOExceptions a couple of times. Could be another instance (or thread) of the plugin locking the file
Thread.Sleep(TimeSpan.FromMilliseconds(20));
}
}
}
catch
{
// don't crash the process just because logging failed.
}
}