Merge pull request #36316 from nextcloud/improve-fatal-logging

Log to `error_log` in fatal case
This commit is contained in:
Simon L 2023-05-23 23:02:18 +02:00 committed by GitHub
commit 3a9abb256e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -359,6 +359,7 @@ class Log implements ILogger, IDataLogger {
$context['level'] = $level;
} catch (Throwable $e) {
// make sure we dont hard crash if logging fails
error_log('Error when trying to log exception: ' . $e->getMessage() . ' ' . $e->getTraceAsString());
}
}