Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Fix #6065: Add backtrace to watchdog:show-one #6066

Draft
wants to merge 1 commit into
base: 13.x
Choose a base branch
from

Conversation

andriokha
Copy link
Contributor

This is a start on #6065, but the output isn't formatted neatly (I think because things are first converted to YAML):

wid: '38'
uid: '1'
type: php
message: 'Error: Class "Drupal\dblog\Controller\Foo" not found in Drupal\dblog\Controller\DbLogController->topLogMessages() (line 417 of /var/www/html/core/modules/dblog/src/Controller/DbLogController.php).'
severity: Error
location: 'https://drupal.ddev.site/admin/reports/access-denied'
referer: 'https://drupal.ddev.site/admin/reports'
hostname: 172.21.0.6
date: '16/Jul 10:36'
username: admin
backtrace: "#0 [internal function]: Drupal\\dblog\\Controller\\DbLogController->topLogMessages()\n#1 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()\n#2 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(593): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}()\n#3 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\\Core\\Render\\Renderer->executeInRenderContext()\n#4 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()\n#5 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(183): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}()\n#6 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()\n#7 /var/www/html/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\\Component\\HttpKernel\\HttpKernel->handle()\n#8 /var/www/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\\Core\\StackMiddleware\\Session->handle()\n#9 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle()\n#10 /var/www/html/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\\Core\\StackMiddleware\\ContentLength->handle()\n#11 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\\big_pipe\\StackMiddleware\\ContentLength->handle()\n#12 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\\page_cache\\StackMiddleware\\PageCache->pass()\n#13 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\\page_cache\\StackMiddleware\\PageCache->handle()\n#14 /var/www/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle()\n#15 /var/www/html/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle()\n#16 /var/www/html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\\Core\\StackMiddleware\\AjaxPageState->handle()\n#17 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(709): Drupal\\Core\\StackMiddleware\\StackedHttpKernel->handle()\n#18 /var/www/html/index.php(19): Drupal\\Core\\DrupalKernel->handle()\n#19 {main}"

Would welcome help from someone who understands the drush output system a little better. I did quickly see if I could make backtrace an array of lines, which displays ok if you run drush wd-one but not when you do drush wd-one --field=backtrace.

Thanks!

Fixes #6065.

@weitzman weitzman marked this pull request as draft July 23, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add backtrace to watchdog:show-one
1 participant