chore: reduce logger noise

This commit is contained in:
Björn Fromme
2026-01-06 14:48:32 +01:00
parent eb1d05aa10
commit 585f87e1f9
+3 -1
View File
@@ -7,6 +7,7 @@ namespace App\Logger;
use App\Entity\LogEntry; use App\Entity\LogEntry;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Monolog\Handler\AbstractProcessingHandler; use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Level;
use Monolog\LogRecord; use Monolog\LogRecord;
/** /**
@@ -14,12 +15,13 @@ use Monolog\LogRecord;
* *
* Writes log records to the LogEntry entity, replacing message placeholders * Writes log records to the LogEntry entity, replacing message placeholders
* with context values. Includes channel, context, and extra data for auditing. * with context values. Includes channel, context, and extra data for auditing.
* Only processes INFO level and above to avoid storing debug messages.
*/ */
class DatabaseHandler extends AbstractProcessingHandler class DatabaseHandler extends AbstractProcessingHandler
{ {
public function __construct(private readonly EntityManagerInterface $entityManager) public function __construct(private readonly EntityManagerInterface $entityManager)
{ {
parent::__construct(); parent::__construct(Level::Info);
} }
protected function write(LogRecord $record): void protected function write(LogRecord $record): void