Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- declare( strict_types = 1 );
- use Psr\Log\AbstractLogger;
- /**
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw < jeroendedauw@gmail.com >
- */
- class LoggerSpy extends AbstractLogger {
- private $logCalls = [];
- /**
- * Logs with an arbitrary level.
- *
- * @param mixed $level
- * @param string $message
- * @param array $context
- *
- * @return null
- */
- public function log( $level, $message, array $context = [] ) {
- $this->logCalls[] = [ $level, $message, $context ];
- }
- public function getLogCalls(): array {
- return $this->logCalls;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement