wxxiong6 / yii-seaslog
Yii2日志模块使用Seaslog
1.0.0
2019-07-25 04:43 UTC
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2024-10-27 11:05:55 UTC
README
使用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