Yii2 设置 分类型分日期保存日志
直接上代码:
'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error'], 'logFile' => '@runtime/logs/'.date('Ym').'/app.error.log', ], [ 'class' => 'yii\log\FileTarget', 'levels' => ['warning'], 'logFile' => '@runtime/logs/'.date('Ym').'/app.warning.log', ], ], ],
相关推荐
WasteLand 2020-10-18
Allinputs 2020-08-30
Ashes 2020-06-14
caiyiii 2020-06-14
kxguan 2020-06-14
daillo 2020-06-14
一粒沙里的世界 2020-06-14
ruxingli 2020-06-14
csssy00 2020-06-14
阿佐 2020-06-14
NameWFY 2020-05-28
NameWFY 2020-05-26
Robin罗兵 2020-05-16
caiyiii 2020-04-29
wmsjlihuan 2020-04-26
cbao 2020-04-26
csssy00 2020-04-19
igogo00 2020-03-09