kuvia/app/Log.php

27 lines
936 B
PHP
Raw Permalink Normal View History

2021-01-17 00:03:52 +00:00
<?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());
}
}
}