0

我正在使用 yii 框架编写应用程序并使用 yii 记录器功能。问题是它总是在日志文件的末尾附加调试日志语句。有谁知道为什么会这样?

这是我的日志文件数据。

 [info] [application] sending sms 
 [info] [application] exit _sendSms 
 [info] [application] first msg to business send . saving to database
 [info] [application] entering _saveChat 
 [info] [application] exit _saveChat 
 [debug] [application] "incoming data value"
 [debug] [application] "api used in  _checkArrayFormat is exotel"
 [debug] [application] " identifier is 123"
 [debug] [application] " sms type is new"
 [debug] [application] "api used in  _setDataKey is exotel"
 [debug] [application] " arrUniqueAplhaNum  value is Array"
 [debug] [application] "new UID created is g2f"
 [debug] [application] "using api for outgoing sms exotel"
 [debug] [application] "using api for outgoing sms exotel"
4

2 回答 2

2

您可以配置应由日志路由记录的日志级别:

array(
    'class' => 'CFileLogRoute',
    'levels' => 'info,warning,error',
)

附带说明:您似乎debug在调用Yii::log()应用程序时指定了日志级别。它本身并没有被禁止,但建议只使用一组几个日志级别。见这里

于 2013-08-26T19:06:26.983 回答
0

您的日志级别配置应该是这样的!

array(
                                    'class' => 'CFileLogRoute',
                    'levels'=>'warning,debug, info', 
                    'logFile'=>'applicationbinary.log',
                    'maxFilesize'=>'1024',
                ),
于 2013-08-30T07:31:39.523 回答