MediaWiki  1.23.14
Psr\Log\NullLogger Class Reference

This Logger can be used to avoid conditional log calls. More...

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

Public Member Functions

 log ($level, $message, array $context=array())
 Logs with an arbitrary level. More...
 
- Public Member Functions inherited from Psr\Log\AbstractLogger
 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...
 

Detailed Description

This Logger can be used to avoid conditional log calls.

Logging should always be optional, and if no logger is provided to your library creating a NullLogger instance to have something to throw logs at is a good way to avoid littering your code with if ($this->logger) { } blocks.

Definition at line 13 of file NullLogger.php.

Member Function Documentation

◆ log()

Psr\Log\NullLogger::log (   $level,
  $message,
array  $context = array() 
)

Logs with an arbitrary level.

Parameters
mixed$level
string$message
array$context
Returns
null

Implements Psr\Log\LoggerInterface.

Definition at line 23 of file NullLogger.php.


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