CodeIgniter 3-配置log_threshold [英] CodeIgniter 3 - configuring log_threshold

查看:216
本文介绍了CodeIgniter 3-配置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

因此,如果我想获取错误和调试消息而不是任何信息消息,我是否需要设置阈值

So if I want to get Error and Debug messages and not any Information messages, do I have to set the threshold

$config['log_threshold'] = 2;

$config['log_threshold'] = array(1, 2);

有人可以给我一些澄清吗?

Could someone give me some clarification?

推荐答案

这两种方法都可行,只是因为参考消息的值为3,而您希望的最大值为2。

Both would work, simply because informational messages has a value of 3, while the maximum one that you want is 2.

但是,如果要记录参考消息和错误消息,而又调试消息,则必须将值设置为 array(1、3)以跳过调试程序。

However, if you wanted to log informational and error messages, but no debug messages, you'd have to set a value of array(1, 3) in order to skip the debug ones.

这篇关于CodeIgniter 3-配置log_threshold的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆