ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAV\MockLogger Class Reference

The MockLogger is a simple PSR-3 implementation that we can use to test whether things get logged correctly. More...

+ Inheritance diagram for Sabre\DAV\MockLogger:
+ Collaboration diagram for Sabre\DAV\MockLogger:

Public Member Functions

 log ($level, $message, array $context=[])
 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...
 

Data Fields

 $logs = []
 

Detailed Description

The MockLogger is a simple PSR-3 implementation that we can use to test whether things get logged correctly.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 15 of file MockLogger.php.

Member Function Documentation

◆ log()

Sabre\DAV\MockLogger::log (   $level,
  $message,
array  $context = [] 
)

Logs with an arbitrary level.

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

Implements Psr\Log\LoggerInterface.

Definition at line 27 of file MockLogger.php.

References $context, and $message.

27  {
28 
29  $this->logs[] = [
30  $level,
31  $message,
32  $context
33  ];
34 
35  }
$context
Definition: webdav.php:25
catch(Exception $e) $message

Field Documentation

◆ $logs

Sabre\DAV\MockLogger::$logs = []

Definition at line 17 of file MockLogger.php.


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