-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
in Drush version 12, the drushLog doesn't get registered as a logger with drupal's logger.factory. #5762
Comments
Most commands use the Drush logger via In general, I can see that Drush's Drupal->Drush logging is working. Note the
|
Using Drush 12, on Drupal 10.2 I can see that neither This means that, to work with Drush 12 all my modules need to be rewritten to write the same message twice: Once, using logger factory to write to dblog, and once, using either messenger or drush logger to print to the screen. Gold star 🌟! |
Describe the bug
A clear and concise description of what the bug is.
When running a command from the terminal that uses Drupal's logger.factory service to print to the screen, nothing prints to the screen.
To Reproduce
What did you do?
Update your site to run Drush 12. Create a module with a command class, and add this method to it:
Expected behavior
What did you expect would happen?
After running this command from the terminal:
drush test_module:test
This should be printed to the screen:
[notice] hello
Actual behavior
What happened instead?
Nothing gets printed to the screen.
Workaround
Is there another way to do the desired action?
Add this to the web/sites/default/settings.php file:
clear the cache, and now the
drush test_module:test
command should print to the screen.System Configuration
Additional information
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: