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