function DrupalBoot8::add_logger

8.0.x DrupalBoot8.php DrupalBoot8::add_logger()
7.x DrupalBoot8.php DrupalBoot8::add_logger()
master DrupalBoot8.php DrupalBoot8::add_logger()

File

lib/Drush/Boot/DrupalBoot8.php, line 38

Namespace

Drush\Boot

Class

DrupalBoot8

Code

function add_logger() {
  // If we're running on Drupal 8 or later, we provide a logger which will send
  // output to drush_log(). This should catch every message logged through every
  // channel.
  \Drupal::getContainer()->get('logger.factory')->addLogger(new \Drush\Log\DrushLog);
}