Skip to content

Commit

Permalink
Additional log message exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Jun 4, 2023
1 parent 2f99378 commit 6936b73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Tgstation.Server.Tests/Live/HardFailLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Except
var logMessage = formatter(state, exception);
if ((logLevel == LogLevel.Error
&& !logMessage.StartsWith("Error disconnecting connection ")
&& !(logMessage.StartsWith("An exception occurred while iterating over the results of a query for context type") && (exception is TaskCanceledException || exception?.InnerException is TaskCanceledException)))
&& !(logMessage.StartsWith("An exception occurred while iterating over the results of a query for context type") && (exception is OperationCanceledException || exception?.InnerException is OperationCanceledException))
&& !(logMessage.StartsWith("An exception occurred in the database while saving changes for context type") && (exception is OperationCanceledException || exception?.InnerException is OperationCanceledException)))
|| (logLevel == LogLevel.Critical && logMessage != "DropDatabase configuration option set! Dropping any existing database..."))
{
Console.WriteLine("UNEXPECTED ERROR OCCURS NEAR HERE");
Expand Down

0 comments on commit 6936b73

Please sign in to comment.