2016-08-08 11:56:19 +02:00
|
|
|
<?php
|
2019-11-30 09:28:09 +01:00
|
|
|
|
2018-11-24 09:29:51 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2022-06-04 08:59:17 +02:00
|
|
|
use Monolog\Level;
|
|
|
|
use Shlinkio\Shlink\Common\Logger\LoggerType;
|
2016-08-08 11:56:19 +02:00
|
|
|
|
2021-12-05 10:08:10 +01:00
|
|
|
$isSwoole = extension_loaded('openswoole');
|
2019-07-23 16:36:56 +02:00
|
|
|
|
2019-11-30 17:59:04 +01:00
|
|
|
return [
|
|
|
|
|
|
|
|
'logger' => [
|
2019-07-23 16:36:56 +02:00
|
|
|
'Shlink' => [
|
2022-06-04 08:59:17 +02:00
|
|
|
// For swoole, send logs as stream
|
|
|
|
'type' => $isSwoole ? LoggerType::STREAM->value : LoggerType::FILE->value,
|
|
|
|
'level' => Level::Debug->value,
|
2016-08-08 11:56:19 +02:00
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
];
|