ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
MockLogger.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\DAV;
4 
6 
15 class MockLogger extends AbstractLogger {
16 
17  public $logs = [];
18 
27  function log($level, $message, array $context = []) {
28 
29  $this->logs[] = [
30  $level,
31  $message,
32  $context
33  ];
34 
35  }
36 }
$context
Definition: webdav.php:25
This is a simple Logger implementation that other Loggers can inherit from.
catch(Exception $e) $message
log($level, $message, array $context=[])
Logs with an arbitrary level.
Definition: MockLogger.php:27
The MockLogger is a simple PSR-3 implementation that we can use to test whether things get logged cor...
Definition: MockLogger.php:15