drush-ops / drush

Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt.

Home Page:https://www.drush.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add backtrace to `watchdog:show-one`

andriokha opened this issue · comments

Is your feature request related to a problem? Please describe.
When an exception is logged to the dblog by \Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber::onError() or \Drupal\Core\Utility\Error::logException(), there is no backtrace shown when using watchdog:show-one and it is very difficult to find the problem in code.

Describe the solution you'd like
Display the backtrace as a separate field.

Additional context
The reason the issue exists is because the log message doesn't by default contain the @backtrace_string placeholder (\Drupal\Core\Utility\Error::DEFAULT_ERROR_MESSAGE is %type: @message in %function (line %line of %file).). The issue was fixed in Drupal 10.2 and 11.x here where they opted to add a new backtrace row.

Lets close this and keep working in the PR #6066