yii2-seasLog extension ¶
使用SeasLog高效日志扩展替换Yii2框架的日志模块,使其提高写日志效率。只需配置就可以实现。
SeasLog扩展https://github.com/SeasX/SeasLog/
Requirements ¶
- Yii2
- PHP >=5.4
- ext-seaslog installed
Installation ¶
composer require wxxiong6/yii-seaslog:"1.0.0"
Usage ¶
main.php
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
'default' => [
'class' => 'wxxiong6\yii\seaslog\Yii2SeasLog',
'levels' => ['trace', 'info', 'error', 'warning'],
'logFile' => 'backend/runtime/',
'logVars' => [],
],
],
],
为了跟yii2日志格式一致,修改php.ini seaslog日志格式
seaslog.default_template = %T %M
Changelog ¶
Release 1.0 - Changelog ¶
- Official stable release
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.