Catch Postgres log connection errors

This commit is contained in:
Qstick 2022-05-14 10:05:42 -05:00
parent adf38f256b
commit a738cfb23a

View file

@ -97,6 +97,11 @@ protected override void Write(LogEventInfo logEvent)
WritePostgresLog(log, connectionString);
}
}
catch (NpgsqlException ex)
{
InternalLogger.Error("Unable to save log event to database: {0}", ex);
throw;
}
catch (SQLiteException ex)
{
InternalLogger.Error("Unable to save log event to database: {0}", ex);