chore: reduce logger noise
This commit is contained in:
@@ -7,6 +7,7 @@ namespace App\Logger;
|
||||
use App\Entity\LogEntry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Monolog\Handler\AbstractProcessingHandler;
|
||||
use Monolog\Level;
|
||||
use Monolog\LogRecord;
|
||||
|
||||
/**
|
||||
@@ -14,12 +15,13 @@ use Monolog\LogRecord;
|
||||
*
|
||||
* Writes log records to the LogEntry entity, replacing message placeholders
|
||||
* 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
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager)
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(Level::Info);
|
||||
}
|
||||
|
||||
protected function write(LogRecord $record): void
|
||||
|
||||
Reference in New Issue
Block a user