improved LDAP logging (#5517)

This commit is contained in:
Kevin Papst
2025-06-07 11:48:09 +02:00
committed by GitHub
parent c8b4e4eabb
commit 46129c7ab9
3 changed files with 76 additions and 38 deletions

View File

@@ -0,0 +1,30 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Tests\Mocks;
use Psr\Log\AbstractLogger;
class TestLogger extends AbstractLogger
{
private array $logs = [];
public function log($level, string|\Stringable $message, array $context = []): void
{
$this->logs[] = [$level, $message, $context];
}
public function cleanLogs(): array
{
$logs = $this->logs;
$this->logs = [];
return $logs;
}
}