mteu / typo3-stream-writer
此扩展增加了将日志记录到 php://stdout` 和 php://stderr` 的功能
0.3.2
2024-09-17 12:13 UTC
Requires
- php: ~8.1.0 || ~8.2.0 || ~8.3.0
- typo3/cms-core: ~12.4.0 || ~13.3.0
Requires (Dev)
- armin/editorconfig-cli: ^1.8 || ^2.0
- ergebnis/composer-normalize: ^2.43
- friendsofphp/php-cs-fixer: ^3.60
- mteu/docblock-rules: ^0.3
- mteu/zealous-stan: ^0.6
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^1.12
- phpstan/phpstan-phpunit: ^1.4
- phpunit/php-code-coverage: ^10.1
- phpunit/phpcov: ^9.0
- phpunit/phpunit: ^10.5
- saschaegerer/phpstan-typo3: ^1.10
- ssch/typo3-rector: ^2.6
- symfony/process: ^6.4 || ^7.1
- typo3/coding-standards: ^0.8.0
- typo3/testing-framework: ^8.2
This package is auto-updated.
Last update: 2024-09-22 23:16:57 UTC
README
TYPO3 Stream Writer 📜
此TYPO3 CMS扩展向TYPO3日志框架添加了一个自定义的 LogWriter
,允许CMS将消息记录到 php://stdout
或 php://stderr
。
⚡️ 快速开始
安装
composer require mteu/typo3-stream-writer
使用
配置您的扩展或TYPO3实例以使用新的写入器。
# config/system/additional.php | typo3conf/system/additional.php <?php declare(strict_types=1); use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Log\LogLevel; use mteu\StreamWriter\Config\StandardStream; use mteu\StreamWriter\Writer\StreamWriter; defined('TYPO3') or die(); $GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'] = [ \Psr\Log\LogLevel::ERROR => [ StreamWriter::class => [ 'outputStream' => StandardStream::Error, 'ignoredComponents' => [ BackendUserAuthentication::class, ] ], ], \Psr\Log\LogLevel::DEBUG => [ StreamWriter::class => [ 'outputStream' => StandardStream::Out, 'ignoredComponents' => [ 'TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', 'TYPO3.CMS.Frontend.Authentication.FrontendUserAuthentication', ], 'maxLevel' => Psr\Log\LogLevel::WARNING, ], ], ];
💡 在
WriterConfiguration
中了解更多关于LogWriter配置的信息。
⭐ 许可证
本项目受 GNU通用公共许可证3.0(或更高版本) 许可。