Filtro en server params

This commit is contained in:
Juan Pablo Vial
2025-06-03 11:37:14 -04:00
parent cb6fa73a21
commit 18fc9a76fd
8 changed files with 81 additions and 17 deletions

View File

@ -0,0 +1,18 @@
<?php
namespace Incoviba\Common\Implement\Log\Processor;
use Incoviba\Service;
use Monolog\LogRecord;
use Monolog\Processor\ProcessorInterface;
class User implements ProcessorInterface
{
public function __construct(protected Service\Login $loginService) {}
public function __invoke(LogRecord $record): LogRecord
{
if ($this->loginService->isIn()) {
$record->extra['user'] = $this->loginService->getUser()->name;
}
return $record;
}
}