Browse Source

Added additional try/catch to logger

pull/46/head
Anairkoen Schno 4 years ago
parent
commit
0f15b4243e
1 changed files with 13 additions and 6 deletions
  1. +13
    -6
      IPA.Loader/Logging/StandardLogger.cs

+ 13
- 6
IPA.Loader/Logging/StandardLogger.cs View File

@ -198,13 +198,20 @@ namespace IPA.Logging
// make sure that the queue isn't being cleared // make sure that the queue isn't being cleared
logWaitEvent.Wait(); logWaitEvent.Wait();
logQueue.Add(new LogMessage
try
{ {
Level = level,
Message = message,
Logger = this,
Time = Utils.CurrentTime()
});
logQueue.Add(new LogMessage
{
Level = level,
Message = message,
Logger = this,
Time = Utils.CurrentTime()
});
}
catch (InvalidOperationException)
{
// the queue has been closed, so we leave it
}
} }
/// <inheritdoc /> /// <inheritdoc />


Loading…
Cancel
Save