27 lines
936 B
PHP
27 lines
936 B
PHP
|
<?php
|
||
|
namespace App;
|
||
|
use Monolog\Processor\UidProcessor;
|
||
|
|
||
|
class Log
|
||
|
{
|
||
|
public function __invoke(Logger $logger)
|
||
|
{
|
||
|
/** @var Logger|\Monolog\Logger $logger */
|
||
|
/** @var StreamHandler[] $handlers */
|
||
|
$handlers = $logger->getHandlers();
|
||
|
foreach ($handlers as $handler) {
|
||
|
/*$handler->setFormatter(new LogstashFormatter('log', basename($handler->getUrl())));
|
||
|
$handler->pushProcessor(new FieldsProcessor());
|
||
|
$handler->pushProcessor(new WebProcessor());
|
||
|
$handler->pushProcessor(new IntrospectionProcessor());
|
||
|
$handler->pushProcessor(new GuardProcessor());
|
||
|
$handler->pushProcessor(new QueryBindingsProcessor());
|
||
|
$handler->pushProcessor(new HeadersProcessor());
|
||
|
$handler->pushProcessor(new BadResponseGuzzleProcessor());
|
||
|
|
||
|
*/
|
||
|
$handler->pushProcessor(new UidProcessor());
|
||
|
}
|
||
|
}
|
||
|
}
|