ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

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

Implements Psr\Log\LoggerInterface.

Definition at line 38 of file AbstractLogger.php.

39 {
40 $this->log(LogLevel::ALERT, $message, $context);
41 }
log($level, $message, array $context=array())
Logs with an arbitrary level.

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

+ Here is the call graph for this function:

◆ critical()

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

Critical conditions.

Example: Application component unavailable, unexpected exception.

Parameters
string$message
array$context
Returns
void

Implements Psr\Log\LoggerInterface.

Definition at line 53 of file AbstractLogger.php.

54 {
55 $this->log(LogLevel::CRITICAL, $message, $context);
56 }

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

+ Here is the call graph for this function:

◆ debug()

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

Detailed debug information.

Parameters
string$message
array$context
Returns
void

Implements Psr\Log\LoggerInterface.

Definition at line 124 of file AbstractLogger.php.

125 {
126 $this->log(LogLevel::DEBUG, $message, $context);
127 }

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

+ Here is the call graph for this function:

◆ emergency()

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

System is unusable.

Parameters
string$message
array$context
Returns
void

Implements Psr\Log\LoggerInterface.

Definition at line 22 of file AbstractLogger.php.

23 {
24 $this->log(LogLevel::EMERGENCY, $message, $context);
25 }

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

+ Here is the call graph for this function:

◆ 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
void

Implements Psr\Log\LoggerInterface.

Definition at line 67 of file AbstractLogger.php.

68 {
69 $this->log(LogLevel::ERROR, $message, $context);
70 }

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

+ Here is the call graph for this function:

◆ info()

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

Interesting events.

Example: User logs in, SQL logs.

Parameters
string$message
array$context
Returns
void

Implements Psr\Log\LoggerInterface.

Definition at line 111 of file AbstractLogger.php.

112 {
113 $this->log(LogLevel::INFO, $message, $context);
114 }

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

+ Here is the call graph for this function:

◆ notice()

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

Normal but significant events.

Parameters
string$message
array$context
Returns
void

Implements Psr\Log\LoggerInterface.

Definition at line 96 of file AbstractLogger.php.

97 {
98 $this->log(LogLevel::NOTICE, $message, $context);
99 }

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

+ Here is the call graph for this function:

◆ 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
void

Implements Psr\Log\LoggerInterface.

Definition at line 83 of file AbstractLogger.php.

84 {
85 $this->log(LogLevel::WARNING, $message, $context);
86 }

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

+ Here is the call graph for this function:

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