Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RfcLogLevel.php

function 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.
2 calls to RfcLogLevel::getLevels()
DbLogController::eventDetails in core/modules/dblog/src/Controller/DbLogController.php
Displays details about a specific database log message.
dblog_filters in core/modules/dblog/dblog.admin.inc
Creates a list of database log administration filters that can be applied.

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;
}
RSS feed
Powered by Drupal