class MonologLogLevel in Monolog 2.x
Same name and namespace in other branches
- 8 src/Logger/MonologLogLevel.php \Drupal\monolog\Logger\MonologLogLevel
Hierarchy
- class \Drupal\monolog\Logger\MonologLogLevel
Expanded class hierarchy of MonologLogLevel
1 file declares its use of MonologLogLevel
- LoggerTest.php in tests/
src/ Unit/ Logger/ LoggerTest.php
File
- src/
Logger/ MonologLogLevel.php, line 15
Namespace
Drupal\monolog\LoggerView source
class MonologLogLevel {
/**
* Log message severity -- Emergency: system is unusable.
*/
const EMERGENCY = MonologLogger::EMERGENCY;
/**
* Log message severity -- Alert: action must be taken immediately.
*/
const ALERT = MonologLogger::ALERT;
/**
* Log message severity -- Critical conditions.
*/
const CRITICAL = MonologLogger::CRITICAL;
/**
* Log message severity -- Error conditions.
*/
const ERROR = MonologLogger::ERROR;
/**
* Log message severity -- Warning conditions.
*/
const WARNING = MonologLogger::WARNING;
/**
* Log message severity -- Normal but significant conditions.
*/
const NOTICE = MonologLogger::NOTICE;
/**
* Log message severity -- Informational messages.
*/
const INFO = MonologLogger::INFO;
/**
* Log message severity -- Debug-level messages.
*/
const DEBUG = MonologLogger::DEBUG;
/**
* An array with the severity levels as keys and labels as values.
*
* @var array
*/
protected static $levels;
/**
* Returns a list of severity levels, as defined Monolog\Logger.
*
* @return array
* Array of the possible severity levels for log messages.
*
* @ingroup logging_severity_levels
*/
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MonologLogLevel:: |
protected static | property | An array with the severity levels as keys and labels as values. | |
MonologLogLevel:: |
constant | Log message severity -- Alert: action must be taken immediately. | ||
MonologLogLevel:: |
constant | Log message severity -- Critical conditions. | ||
MonologLogLevel:: |
constant | Log message severity -- Debug-level messages. | ||
MonologLogLevel:: |
constant | Log message severity -- Emergency: system is unusable. | ||
MonologLogLevel:: |
constant | Log message severity -- Error conditions. | ||
MonologLogLevel:: |
public static | function | Returns a list of severity levels, as defined Monolog\Logger. | |
MonologLogLevel:: |
constant | Log message severity -- Informational messages. | ||
MonologLogLevel:: |
constant | Log message severity -- Normal but significant conditions. | ||
MonologLogLevel:: |
constant | Log message severity -- Warning conditions. |