Add --show-drupal-logs option to core:cron command#6516
Add --show-drupal-logs option to core:cron command#6516rabbitlair wants to merge 3 commits intodrush-ops:13.xfrom
Conversation
This adds a new option to display Drupal watchdog logs generated during cron execution, without the noise from Drush bootstrap. New options: - --show-drupal-logs: Enable log display - --log-severity: Filter by minimum severity (0-7) - --log-type: Filter by log type (e.g., 'cron', 'php') Fixes drush-ops#6515
|
Is it also worth a discussion about potentially rework what I feel like in my ideal scenario there would be the following options, that generally match the matters I see with other commands and executables:
Then we wouldn't need to special case this command itself, but I know that's a larger issue and I'm not sure if it's been discussed. Just wanted to raise the possibility. |
|
@weitzman or @greg-1-anderson , would you like us to proceed with the PR as is or expand scope to include @davereid 's suggestions? |
|
Neither. We are not making any big changes to Drush at the moment. Focusing on https://www.drupal.org/project/drupal/issues/3453474. Logging there is not yet determined so input is welcome. |
Description
Adds
--show-drupal-logsoption tocore:croncommand to display Drupal watchdog logs generated during cron execution without Drush bootstrap noise.Fixes #6515
Changes
Connectiondependency injection toDrupalCommands--show-drupal-logs,--log-severity, and--log-typeoptionsgetLastWatchdogId()to capture pre-cron statedisplayCronLogs()to query and format watchdog entriesformatLogMessage()to process log variablesNew Features
Testing
composer cs)composer phpstan)Backwards Compatibility