Update logger.md (#7036)

Co-authored-by: 李铭昕 <715557344@qq.com>
This commit is contained in:
王成涛 2024-09-26 10:14:15 +08:00 committed by GitHub
parent 0de1034bad
commit 1bf6f9cd0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 36 additions and 36 deletions

View File

@ -21,7 +21,7 @@ return [
'class' => \Monolog\Handler\StreamHandler::class, 'class' => \Monolog\Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => \Monolog\Logger::DEBUG, 'level' => \Monolog\Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -212,7 +212,7 @@ return [
'class' => \Monolog\Handler\StreamHandler::class, 'class' => \Monolog\Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => 'php://stdout', 'stream' => 'php://stdout',
'level' => \Monolog\Logger::INFO, 'level' => \Monolog\Level::Info,
], ],
], ],
'formatter' => $formatter, 'formatter' => $formatter,
@ -240,7 +240,7 @@ return [
'class' => Monolog\Handler\RotatingFileHandler::class, 'class' => Monolog\Handler\RotatingFileHandler::class,
'constructor' => [ 'constructor' => [
'filename' => BASE_PATH . '/runtime/logs/hyperf.log', 'filename' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Monolog\Logger::DEBUG, 'level' => Monolog\Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -270,7 +270,7 @@ declare(strict_types=1);
use Monolog\Handler; use Monolog\Handler;
use Monolog\Formatter; use Monolog\Formatter;
use Monolog\Logger; use Monolog\Level;
return [ return [
'default' => [ 'default' => [
@ -279,7 +279,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Logger::INFO, 'level' => Level::Info,
], ],
'formatter' => [ 'formatter' => [
'class' => Formatter\LineFormatter::class, 'class' => Formatter\LineFormatter::class,
@ -294,7 +294,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log',
'level' => Logger::DEBUG, 'level' => Level::Debug,
], ],
'formatter' => [ 'formatter' => [
'class' => Formatter\JsonFormatter::class, 'class' => Formatter\JsonFormatter::class,
@ -318,7 +318,7 @@ declare(strict_types=1);
use Monolog\Handler; use Monolog\Handler;
use Monolog\Formatter; use Monolog\Formatter;
use Monolog\Logger; use Monolog\Level;
return [ return [
'default' => [ 'default' => [
@ -330,7 +330,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Logger::INFO, 'level' => Level::Info,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -348,7 +348,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log',
'level' => Logger::DEBUG, 'level' => Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [

View File

@ -21,7 +21,7 @@ return [
'class' => \Monolog\Handler\StreamHandler::class, 'class' => \Monolog\Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => \Monolog\Logger::DEBUG, 'level' => \Monolog\Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -211,7 +211,7 @@ return [
'class' => \Monolog\Handler\StreamHandler::class, 'class' => \Monolog\Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => 'php://stdout', 'stream' => 'php://stdout',
'level' => \Monolog\Logger::INFO, 'level' => \Monolog\Level::Info,
], ],
], ],
'formatter' => $formatter, 'formatter' => $formatter,
@ -239,7 +239,7 @@ return [
'class' => Monolog\Handler\RotatingFileHandler::class, 'class' => Monolog\Handler\RotatingFileHandler::class,
'constructor' => [ 'constructor' => [
'filename' => BASE_PATH . '/runtime/logs/hyperf.log', 'filename' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Monolog\Logger::DEBUG, 'level' => Monolog\Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -268,7 +268,7 @@ declare(strict_types=1);
use Monolog\Handler; use Monolog\Handler;
use Monolog\Formatter; use Monolog\Formatter;
use Monolog\Logger; use Monolog\Level;
return [ return [
'default' => [ 'default' => [
@ -277,7 +277,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Logger::INFO, 'level' => Level::Info,
], ],
'formatter' => [ 'formatter' => [
'class' => Formatter\LineFormatter::class, 'class' => Formatter\LineFormatter::class,
@ -292,7 +292,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log',
'level' => Logger::DEBUG, 'level' => Level::Info,
], ],
'formatter' => [ 'formatter' => [
'class' => Formatter\JsonFormatter::class, 'class' => Formatter\JsonFormatter::class,
@ -315,7 +315,7 @@ declare(strict_types=1);
use Monolog\Handler; use Monolog\Handler;
use Monolog\Formatter; use Monolog\Formatter;
use Monolog\Logger; use Monolog\Level;
return [ return [
'default' => [ 'default' => [
@ -327,7 +327,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Logger::INFO, 'level' => Level::Info,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -345,7 +345,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log',
'level' => Logger::DEBUG, 'level' => Level::Info,
], ],
], ],
'formatter' => [ 'formatter' => [

View File

@ -21,7 +21,7 @@ return [
'class' => \Monolog\Handler\StreamHandler::class, 'class' => \Monolog\Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => \Monolog\Logger::DEBUG, 'level' => \Monolog\Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -211,7 +211,7 @@ return [
'class' => \Monolog\Handler\StreamHandler::class, 'class' => \Monolog\Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => 'php://stdout', 'stream' => 'php://stdout',
'level' => \Monolog\Logger::INFO, 'level' => \Monolog\Level::Info,
], ],
], ],
'formatter' => $formatter, 'formatter' => $formatter,
@ -239,7 +239,7 @@ return [
'class' => Monolog\Handler\RotatingFileHandler::class, 'class' => Monolog\Handler\RotatingFileHandler::class,
'constructor' => [ 'constructor' => [
'filename' => BASE_PATH . '/runtime/logs/hyperf.log', 'filename' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Monolog\Logger::DEBUG, 'level' => Monolog\Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -268,7 +268,7 @@ declare(strict_types=1);
use Monolog\Handler; use Monolog\Handler;
use Monolog\Formatter; use Monolog\Formatter;
use Monolog\Logger; use Monolog\Level;
return [ return [
'default' => [ 'default' => [
@ -277,7 +277,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Logger::INFO, 'level' => Level::Info,
], ],
'formatter' => [ 'formatter' => [
'class' => Formatter\LineFormatter::class, 'class' => Formatter\LineFormatter::class,
@ -292,7 +292,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log',
'level' => Logger::DEBUG, 'level' => Level::Debug,
], ],
'formatter' => [ 'formatter' => [
'class' => Formatter\JsonFormatter::class, 'class' => Formatter\JsonFormatter::class,
@ -315,7 +315,7 @@ declare(strict_types=1);
use Monolog\Handler; use Monolog\Handler;
use Monolog\Formatter; use Monolog\Formatter;
use Monolog\Logger; use Monolog\Level;
return [ return [
'default' => [ 'default' => [
@ -327,7 +327,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Logger::INFO, 'level' => Level::Info,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -345,7 +345,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log',
'level' => Logger::DEBUG, 'level' => Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [

View File

@ -21,7 +21,7 @@ return [
'class' => \Monolog\Handler\StreamHandler::class, 'class' => \Monolog\Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => \Monolog\Logger::DEBUG, 'level' => \Monolog\Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -211,7 +211,7 @@ return [
'class' => \Monolog\Handler\StreamHandler::class, 'class' => \Monolog\Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => 'php://stdout', 'stream' => 'php://stdout',
'level' => \Monolog\Logger::INFO, 'level' => \Monolog\Level::Info,
], ],
], ],
'formatter' => $formatter, 'formatter' => $formatter,
@ -239,7 +239,7 @@ return [
'class' => Monolog\Handler\RotatingFileHandler::class, 'class' => Monolog\Handler\RotatingFileHandler::class,
'constructor' => [ 'constructor' => [
'filename' => BASE_PATH . '/runtime/logs/hyperf.log', 'filename' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Monolog\Logger::DEBUG, 'level' => Monolog\Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -268,7 +268,7 @@ declare(strict_types=1);
use Monolog\Handler; use Monolog\Handler;
use Monolog\Formatter; use Monolog\Formatter;
use Monolog\Logger; use Monolog\Level;
return [ return [
'default' => [ 'default' => [
@ -277,7 +277,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Logger::INFO, 'level' => Level::Info,
], ],
'formatter' => [ 'formatter' => [
'class' => Formatter\LineFormatter::class, 'class' => Formatter\LineFormatter::class,
@ -292,7 +292,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log',
'level' => Logger::DEBUG, 'level' => Level::Debug,
], ],
'formatter' => [ 'formatter' => [
'class' => Formatter\JsonFormatter::class, 'class' => Formatter\JsonFormatter::class,
@ -315,7 +315,7 @@ declare(strict_types=1);
use Monolog\Handler; use Monolog\Handler;
use Monolog\Formatter; use Monolog\Formatter;
use Monolog\Logger; use Monolog\Level;
return [ return [
'default' => [ 'default' => [
@ -327,7 +327,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
'level' => Logger::INFO, 'level' => Level::Info,
], ],
], ],
'formatter' => [ 'formatter' => [
@ -345,7 +345,7 @@ return [
'class' => Handler\StreamHandler::class, 'class' => Handler\StreamHandler::class,
'constructor' => [ 'constructor' => [
'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log', 'stream' => BASE_PATH . '/runtime/logs/hyperf-debug.log',
'level' => Logger::DEBUG, 'level' => Level::Debug,
], ],
], ],
'formatter' => [ 'formatter' => [