drush-ops/drush — pull request #922 by phenaproxima (2014-10-23 16:19:14+00:00)
Title: Added a basic PSR-3 and RFC compatible logger

This patch is basically a shim which makes drush_log() compatible with the new Drupal 8 logging system.

It defines a PSR-3 compatible logger class which sends output to drush_log(). It does this alongside existing loggers, so messages will also be logged to the database or syslog (if those loggers are enabled).

I haven't really tested how it works with drupal_set_message(), which still uses the session (not the logging system) to store messages. This logger doesn't touch the session at all, so I'm not sure it will catch messages set with drupal_set_message().

So, it's a start. At the very least, this should allow dependency-injected code to output messages to the drush shell without calling drush_log directly.