Php Yii框架记录器:删除路径
我正在使用yii日志记录我的事件。这是我的日志样本Php Yii框架记录器:删除路径,php,yii,Php,Yii,我正在使用yii日志记录我的事件。这是我的日志样本 [2013-05-24 11:58:29.015965] [debug] [SiteController] this is debug test in D:\work\www\cs360rnd\trunk\protected\controllers\SiteController.php (79) in D:\work\www\cs360rnd\trunk\index.php (16) 我想从日志中删除下面的行 在D:\work\www\cs
[2013-05-24 11:58:29.015965] [debug] [SiteController] this is debug test
in D:\work\www\cs360rnd\trunk\protected\controllers\SiteController.php (79)
in D:\work\www\cs360rnd\trunk\index.php (16)
我想从日志中删除下面的行
在D:\work\www\cs360rnd\trunk\index.php(16)中
有人知道如何从日志布局中删除它吗?这些是回溯条目 是否要删除带有
index.php
的行?(一)
或者您只想保留第一个(使用SiteController
)?(二)
(1) 如果callstack中有两个以上的元素,则和(2)不相同
见第462行
首先,仅当您处于调试模式时,才会使用日志消息记录调试回溯
第二,
如果您的目标是(1)-恐怕您需要扩展Yii
类,重写log
方法并使用它而不是内置的
如果您的目标是(2)-YII_TRACE_LEVEL
应等于1
我希望这能有所帮助。+1用于扩展类,而不是像大多数人所说的那样更改框架:)