RfcLogLevel::getLevels

public static RfcLogLevel::getLevels()

Returns a list of severity levels, as defined in RFC 5424.

Return value

array Array of the possible severity levels for log messages.

See also

http://tools.ietf.org/html/rfc5424

Related topics

Logging severity levels
Logging severity levels as defined in RFC 5424.

File

core/lib/Drupal/Core/Logger/RfcLogLevel.php, line 91

Class

RfcLogLevel
Defines various logging severity levels.

Namespace

Drupal\Core\Logger

Code

public static function getLevels() {
  if (!static::$levels) {
    static::$levels = [
      static::EMERGENCY => new TranslatableMarkup('Emergency'),
      static::ALERT => new TranslatableMarkup('Alert'),
      static::CRITICAL => new TranslatableMarkup('Critical'),
      static::ERROR => new TranslatableMarkup('Error'),
      static::WARNING => new TranslatableMarkup('Warning'),
      static::NOTICE => new TranslatableMarkup('Notice'),
      static::INFO => new TranslatableMarkup('Info'),
      static::DEBUG => new TranslatableMarkup('Debug'),
    ];
  }

  return static::$levels;
}
doc_Drupal
2016-10-29 09:38:38
Comments
Leave a Comment

Please login to continue.