ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
 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...
 

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
void

Implements Psr\Log\LoggerInterface.

Definition at line 24 of file NullLogger.php.

25  {
26  // noop
27  }

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