Dicas para melhorar a organização dos logs com pequenas configurações
'default' => [
'handler' => [
'class' => Monolog\Handler\StreamHandler::class,
'constructor' => [
'stream' => 'php://stdout',
'messageType' => Monolog\Handler\ErrorLogHandler::OPERATING_SYSTEM,
'level' => Monolog\Level::Info,
],
],
'formatter' => [
'class' => Monolog\Formatter\JsonFormatter::class,
'constructor' => [
'includeStacktraces' => true,
],
],
'PsrLogMessageProcessor' => [
'class' => Monolog\Processor\PsrLogMessageProcessor::class,
],
'processors' => [
new Monolog\Processor\GitProcessor(),
new Monolog\Processor\MemoryUsageProcessor(),
new Monolog\Processor\ProcessIdProcessor(),
new Monolog\Processor\WebProcessor(),
],
]