MediaWiki  1.23.13
Psr\Log\AbstractLogger Class Reference

This is a simple Logger implementation that other Loggers can inherit from. More...

Inheritance diagram for Psr\Log\AbstractLogger:
Collaboration diagram for Psr\Log\AbstractLogger:

Public Member Functions

 alert ($message, array $context=array())
 Action must be taken immediately. More...
 
 critical ($message, array $context=array())
 Critical conditions. More...
 
 debug ($message, array $context=array())
 Detailed debug information. More...
 
 emergency ($message, array $context=array())
 System is unusable. More...
 
 error ($message, array $context=array())
 Runtime errors that do not require immediate action but should typically be logged and monitored. More...
 
 info ($message, array $context=array())
 Interesting events. More...
 
 notice ($message, array $context=array())
 Normal but significant events. More...
 
 warning ($message, array $context=array())
 Exceptional occurrences that are not errors. More...
 
- Public Member Functions inherited from Psr\Log\LoggerInterface
 log ($level, $message, array $context=array())
 Logs with an arbitrary level. More...
 

Detailed Description

This is a simple Logger implementation that other Loggers can inherit from.

It simply delegates all log-level-specific methods to the log method to reduce boilerplate code that a simple Logger that does the same thing with messages regardless of the error level has to implement.

Definition at line 12 of file AbstractLogger.php.

Member Function Documentation

◆ alert()

Psr\Log\AbstractLogger::alert (   $message,
array  $context = array() 
)

Action must be taken immediately.

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.

Parameters
string$message
array$context
Returns
null

Implements Psr\Log\LoggerInterface.

Definition at line 36 of file AbstractLogger.php.

References Psr\Log\LogLevel\ALERT, and Psr\Log\LoggerInterface\log().

◆ critical()

Psr\Log\AbstractLogger::critical (   $message,
array  $context = array() 
)

Critical conditions.

Example: Application component unavailable, unexpected exception.

Parameters
string$message
array$context
Returns
null

Implements Psr\Log\LoggerInterface.

Definition at line 50 of file AbstractLogger.php.

References Psr\Log\LogLevel\CRITICAL, and Psr\Log\LoggerInterface\log().

◆ debug()

Psr\Log\AbstractLogger::debug (   $message,
array  $context = array() 
)

Detailed debug information.

Parameters
string$message
array$context
Returns
null

Implements Psr\Log\LoggerInterface.

Definition at line 116 of file AbstractLogger.php.

References Psr\Log\LogLevel\DEBUG, and Psr\Log\LoggerInterface\log().

◆ emergency()

Psr\Log\AbstractLogger::emergency (   $message,
array  $context = array() 
)

System is unusable.

Parameters
string$message
array$context
Returns
null

Implements Psr\Log\LoggerInterface.

Definition at line 21 of file AbstractLogger.php.

References Psr\Log\LogLevel\EMERGENCY, and Psr\Log\LoggerInterface\log().

◆ error()

Psr\Log\AbstractLogger::error (   $message,
array  $context = array() 
)

Runtime errors that do not require immediate action but should typically be logged and monitored.

Parameters
string$message
array$context
Returns
null

Implements Psr\Log\LoggerInterface.

Definition at line 63 of file AbstractLogger.php.

References Psr\Log\LogLevel\ERROR, and Psr\Log\LoggerInterface\log().

◆ info()

Psr\Log\AbstractLogger::info (   $message,
array  $context = array() 
)

Interesting events.

Example: User logs in, SQL logs.

Parameters
string$message
array$context
Returns
null

Implements Psr\Log\LoggerInterface.

Definition at line 104 of file AbstractLogger.php.

References Psr\Log\LogLevel\INFO, and Psr\Log\LoggerInterface\log().

◆ notice()

Psr\Log\AbstractLogger::notice (   $message,
array  $context = array() 
)

Normal but significant events.

Parameters
string$message
array$context
Returns
null

Implements Psr\Log\LoggerInterface.

Definition at line 90 of file AbstractLogger.php.

References Psr\Log\LoggerInterface\log(), and Psr\Log\LogLevel\NOTICE.

◆ warning()

Psr\Log\AbstractLogger::warning (   $message,
array  $context = array() 
)

Exceptional occurrences that are not errors.

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

Parameters
string$message
array$context
Returns
null

Implements Psr\Log\LoggerInterface.

Definition at line 78 of file AbstractLogger.php.

References Psr\Log\LoggerInterface\log(), and Psr\Log\LogLevel\WARNING.


The documentation for this class was generated from the following file: