shlink/config/autoload/logger.local.php.dist

40 lines
846 B
Text

<?php
declare(strict_types=1);
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
$isSwoole = extension_loaded('swoole');
// For swoole, send logs to standard output
$logger = $isSwoole ? [
'handlers' => [
'shlink_rotating_handler' => [
'level' => Logger::EMERGENCY, // This basically disables regular file logs
],
'shlink_stdout_handler' => [
'class' => StreamHandler::class,
'level' => Logger::DEBUG,
'stream' => 'php://stdout',
'formatter' => 'dashed',
],
],
'loggers' => [
'Shlink' => [
'handlers' => ['shlink_stdout_handler'],
],
],
] : [
'handlers' => [
'shlink_rotating_handler' => [
'level' => Logger::DEBUG,
],
],
];
return [
'logger' => $logger,
];