mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-29 20:14:15 -06:00
36 lines
612 B
Plaintext
36 lines
612 B
Plaintext
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Monolog\Handler\StreamHandler;
|
|
use Monolog\Logger;
|
|
|
|
$isSwoole = extension_loaded('openswoole');
|
|
|
|
// For swoole, send logs to standard output
|
|
$handler = $isSwoole
|
|
? [
|
|
'name' => StreamHandler::class,
|
|
'params' => [
|
|
'level' => Logger::DEBUG,
|
|
'stream' => 'php://stdout',
|
|
],
|
|
]
|
|
: [
|
|
'params' => [
|
|
'level' => Logger::DEBUG,
|
|
],
|
|
];
|
|
|
|
return [
|
|
|
|
'logger' => [
|
|
'Shlink' => [
|
|
'handlers' => [
|
|
'shlink_handler' => $handler,
|
|
],
|
|
],
|
|
],
|
|
|
|
];
|