Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/1000'
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Nov 20, 2014
2 parents 323f780 + ad2a9d5 commit c25ee61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
17 changes: 8 additions & 9 deletions commands/core/drupal/environment.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

use Drupal\Core\Site\Settings;
use Drupal\Core\Logger\RfcLogLevel;

/**
* Get complete information for all available modules.
Expand Down Expand Up @@ -298,14 +297,14 @@ function drush_theme_disable($themes) {
*/
function drush_watchdog_severity_levels() {
return array(
RfcLogLevel::EMERGENCY => 'emergency',
RfcLogLevel::ALERT => 'alert',
RfcLogLevel::CRITICAL => 'critical',
RfcLogLevel::ERROR => 'error',
RfcLogLevel::WARNING => 'warning',
RfcLogLevel::NOTICE => 'notice',
RfcLogLevel::INFO => 'info',
RfcLogLevel::DEBUG => 'debug',
LogLevel::EMERGENCY => 'emergency',
LogLevel::ALERT => 'alert',
LogLevel::CRITICAL => 'critical',
LogLevel::ERROR => 'error',
LogLevel::WARNING => 'warning',
LogLevel::NOTICE => 'notice',
LogLevel::INFO => 'info',
LogLevel::DEBUG => 'debug',
);
}

Expand Down
13 changes: 2 additions & 11 deletions lib/Drush/Log/DrushLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

namespace Drush\Log;

use Drupal\Core\Logger\RfcLoggerTrait;
use Drupal\Core\Logger\RfcLogLevel;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
use Psr\Log\LoggerTrait;

class DrushLog implements LoggerInterface {

use RfcLoggerTrait;
use LoggerTrait;

/**
* {@inheritdoc}
Expand All @@ -21,25 +20,17 @@ public function log($level, $message, array $context = array()) {
// and they should cause Drush to exit or panic. Not sure how to handle this,
// though.
switch ($level) {
case RfcLogLevel::ALERT:
case RfcLogLevel::CRITICAL:
case RfcLogLevel::EMERGENCY:
case RfcLogLevel::ERROR:
case LogLevel::ALERT:
case LogLevel::CRITICAL:
case LogLevel::EMERGENCY:
case LogLevel::ERROR:
$error_type = 'error';
break;

case RfcLogLevel::WARNING:
case LogLevel::WARNING:
$error_type = 'warning';
break;

case RfcLogLevel::DEBUG:
case RfcLogLevel::INFO:
case RfcLogLevel::NOTICE:
case LogLevel::DEBUG:
case LogLevel::INFO:
case LogLevel::NOTICE:
Expand Down

0 comments on commit c25ee61

Please sign in to comment.