Skip to content

Commit 3a9abb2

Browse files
authored
Merge pull request #36316 from nextcloud/improve-fatal-logging
Log to `error_log` in fatal case
2 parents 0fca823 + 1dcc855 commit 3a9abb2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/private/Log.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ public function logData(string $message, array $data, array $context = []): void
359359
$context['level'] = $level;
360360
} catch (Throwable $e) {
361361
// make sure we dont hard crash if logging fails
362+
error_log('Error when trying to log exception: ' . $e->getMessage() . ' ' . $e->getTraceAsString());
362363
}
363364
}
364365

0 commit comments

Comments
 (0)