Commit 3d2b3824 authored by catch's avatar catch

Issue #2857437 by mfb: pass raw backtrace to loggers for errors, not just exceptions

parent 84bbc573
......@@ -164,7 +164,8 @@ function _drupal_log_error($error, $fatal = FALSE) {
// installer.
if (\Drupal::hasService('logger.factory')) {
try {
\Drupal::logger('php')->log($error['severity_level'], '%type: @message in %function (line %line of %file) @backtrace_string.', $error);
// Provide the PHP backtrace to logger implementations.
\Drupal::logger('php')->log($error['severity_level'], '%type: @message in %function (line %line of %file) @backtrace_string.', $error + ['backtrace' => $backtrace]);
}
catch (\Exception $e) {
// We can't log, for example because the database connection is not
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment