TYPO3  7.6
Static Public Member Functions | Public Attributes | Static Protected Attributes | List of all members
LogLevel Class Reference

Static Public Member Functions

static getName ($level)
 
static isValidLevel ($level)
 
static validateLevel ($level)
 
static normalizeLevel ($level)
 

Public Attributes

const EMERGENCY = 0
 
const ALERT = 1
 
const CRITICAL = 2
 
const ERROR = 3
 
const WARNING = 4
 
const NOTICE = 5
 
const INFO = 6
 
const DEBUG = 7
 

Static Protected Attributes

static $levels
 

Detailed Description

Log levels according to RFC 3164

Definition at line 20 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Member Function Documentation

static getName (   $level)
static

Resolves the name of a log level.

Parameters
int$levelLog level.
Returns
string Log level name.

Definition at line 118 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Referenced by LogRecord\__toString(), PhpErrorLogWriter\writeLog(), and FileWriter\writeLog().

static isValidLevel (   $level)
static

Checks a level for validity, whether it is an integer and in the range of 0-7.

Parameters
int$levellog level to validate
Returns
bool TRUE if the given log level is valid, FALSE otherwise

Definition at line 131 of file typo3/sysext/core/Classes/Log/LogLevel.php.

static normalizeLevel (   $level)
static

Normalizes level by converting it from string to integer

Parameters
string$level
Returns
int|string

Definition at line 156 of file typo3/sysext/core/Classes/Log/LogLevel.php.

static validateLevel (   $level)
static

Validates a log level.

Parameters
int$levellog level to validate
Returns
void
Exceptions
\Psr\Log\InvalidArgumentExceptionif the given log level is invalid

Definition at line 143 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Referenced by Logger\addProcessor(), Logger\addWriter(), LogManager\getConfigurationForLogger(), LogRecord\setLevel(), and Logger\setMinimumLogLevel().

Member Data Documentation

$levels
staticprotected
Initial value:
= array(
self::EMERGENCY => 'EMERGENCY',
self::ALERT => 'ALERT',
self::CRITICAL => 'CRITICAL',
self::ERROR => 'ERROR',
self::WARNING => 'WARNING',
self::NOTICE => 'NOTICE',
self::INFO => 'INFO',
self::DEBUG => 'DEBUG'
)

Definition at line 101 of file typo3/sysext/core/Classes/Log/LogLevel.php.

const ALERT = 1

Definition at line 39 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Referenced by Logger\alert().

const CRITICAL = 2

Definition at line 48 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Referenced by Logger\critical().

const DEBUG = 7

Definition at line 94 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Referenced by Logger\debug().

const EMERGENCY = 0
const ERROR = 3

Definition at line 57 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Referenced by Logger\error().

const INFO = 6

Definition at line 85 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Referenced by Logger\info().

const NOTICE = 5

Definition at line 76 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Referenced by Logger\notice().

const WARNING = 4

Definition at line 67 of file typo3/sysext/core/Classes/Log/LogLevel.php.

Referenced by Logger\warning().