function drush_watchdog_severity_levels

8.0.x environment_7.inc drush_watchdog_severity_levels()
8.0.x environment_6.inc drush_watchdog_severity_levels()
8.0.x environment.inc drush_watchdog_severity_levels()
7.x environment_7.inc drush_watchdog_severity_levels()
7.x environment_6.inc drush_watchdog_severity_levels()
7.x environment.inc drush_watchdog_severity_levels()
master environment_7.inc drush_watchdog_severity_levels()
master environment.inc drush_watchdog_severity_levels()

Helper function to obtain the severity levels based on Drupal version.

Return value

array Watchdog severity levels keyed by RFC 3164 severities.

4 calls to drush_watchdog_severity_levels()
core_watchdog_format_result in commands/core/watchdog.drush.inc
Format a watchdog database row.
core_watchdog_query in commands/core/watchdog.drush.inc
Build a WHERE snippet based on given parameters.
drush_core_watchdog_list in commands/core/watchdog.drush.inc
Command callback.
system_watchdog in includes/drupal.inc
Log Drupal watchdog() calls.

File

commands/core/drupal/environment.inc, line 320
Specific functions for a drupal 8+ environment. drush_include_engine() magically includes either this file or environment_X.inc depending on which version of drupal Drush is called from.

Code

function drush_watchdog_severity_levels() {
  return array(
    RfcLogLevel::EMERGENCY => LogLevel::EMERGENCY,
    RfcLogLevel::ALERT => LogLevel::ALERT,
    RfcLogLevel::CRITICAL => LogLevel::CRITICAL,
    RfcLogLevel::ERROR => LogLevel::ERROR,
    RfcLogLevel::WARNING => LogLevel::WARNING,
    RfcLogLevel::NOTICE => LogLevel::NOTICE,
    RfcLogLevel::INFO => LogLevel::INFO,
    RfcLogLevel::DEBUG => LogLevel::DEBUG,
  );
}