Skip to content

Commit

Permalink
Log to error_log in fatal case
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Windey <ro.windey@gmail.com>
  • Loading branch information
R0Wi authored and nickvergessen committed Apr 17, 2023
1 parent b21c5c8 commit e4aea28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ public function logData(string $message, array $data, array $context = []): void
$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());
}
}

Expand Down

0 comments on commit e4aea28

Please sign in to comment.