好吧我搞糊涂了。
在application/config.php
里面,它在评论中说:
| If you have enabled error logging, you can set an error threshold to
| determine what gets logged. Threshold options are:
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages
|
| You can also pass an array with threshold levels to show individual error types
|
| array(2) = Debug Messages, without Error Messages
因此,如果我希望获得错误和调试消息,而不是任何信息消息,是否必须设置阈值
$config['log_threshold'] = 2;
或
$config['log_threshold'] = array(1, 2);
有人能给予我澄清一下吗?
2条答案
按热度按时间ibrsph3r1#
这两种方法都有效,因为信息性消息的值为3,而您需要的最大值为2。
但是,如果您希望记录信息性消息和错误消息,而 no 调试消息,则必须设置
array(1, 3)
值以跳过调试消息。cqoc49vn2#
在/application/config/config. php中设置$config ['日志阈值']= 1;