CodeIgniter 3 - 配置 log_threshold
CodeIgniter 3 - configuring log_threshold
好吧,我搞糊涂了。
里面 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);
有人可以给我一些说明吗?
两者都可以,因为信息性消息的值为 3,而您想要的最大值为 2。
但是,如果您想记录信息性和错误消息,但 没有 调试消息,则必须设置值 array(1, 3)
才能跳过调试的。
在/application/config/config.php设置
$配置['log_threshold'] = 1;
好吧,我搞糊涂了。
里面 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);
有人可以给我一些说明吗?
两者都可以,因为信息性消息的值为 3,而您想要的最大值为 2。
但是,如果您想记录信息性和错误消息,但 没有 调试消息,则必须设置值 array(1, 3)
才能跳过调试的。
在/application/config/config.php设置 $配置['log_threshold'] = 1;