Open obriat opened 1 year ago
This could now be comfortable added to maint:set
My guess would be to add the following line at drush/src/Commands/core/MaintCommands.php:56
\Drupal::logger("system")->notice(dt('Maintenance Mode @state.', ['@state' => ($value === '1') ? 'enabled' : 'enabled']));
But IMHO the default drush behavior should be to forward all log messages to Drupal if a working instance is detected, so $this->logger()->info()
could be used instead (https://github.com/drush-ops/drush/issues/5850#issuecomment-1956184153)
See also https://www.drupal.org/project/drupal/issues/229778#comment-14882222
I think status who is fine. I encourage folks to keep working on an api to drupal core and that can do the logging. Once available drush will call that instead of state.
Until then feel free to hook into maint:set and add a log call.
Maintenance mode is a major operation so it should be logged properly. The issue already exist on Drupal: https://www.drupal.org/project/drupal/issues/229778
Either log all
state:set
operation or only the major ones:system.*