for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PanicLabCore\Services\Debug\Log;
use function json_encode;
use Psr\Log\LoggerInterface;
class DebugLogger implements DebugLoggerInterface
{
/** @var LoggerInterface */
private $logger;
public function __construct(LoggerInterface $logger)
$this->logger = $logger;
}
/**
* {@inheritdoc}
*/
public function logBefore(string $method, array $params): void
$this->logger->info(
'Before \'' . $method . '\' with params: ' . json_encode($params)
);
public function logAfter(string $method, array $result): void
'After \'' . $method . '\' with result: ' . json_encode($result)