hyperf-chat/config/autoload/logger.php

32 lines
862 B
PHP
Raw Normal View History

2020-11-02 22:45:37 +08:00
<?php
declare(strict_types=1);
2021-09-04 19:13:25 +08:00
2020-11-02 22:45:37 +08:00
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
return [
'default' => [
2021-09-04 19:13:25 +08:00
'handler' => [
'class' => Monolog\Handler\RotatingFileHandler::class,
2020-11-02 22:45:37 +08:00
'constructor' => [
2021-09-04 19:13:25 +08:00
'filename' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Monolog\Logger::DEBUG,
2020-11-02 22:45:37 +08:00
],
],
'formatter' => [
2021-09-04 19:13:25 +08:00
'class' => Monolog\Formatter\LineFormatter::class,
2020-11-02 22:45:37 +08:00
'constructor' => [
2021-09-04 19:13:25 +08:00
'format' => null,
'dateFormat' => 'Y-m-d H:i:s',
2020-11-02 22:45:37 +08:00
'allowInlineLineBreaks' => true,
],
],
],
];