dqhr76378 2015-10-20 13:27
浏览 146
已采纳

CodeIgniter 3 - 配置log_threshold

Ok I got confused.

Inside application/config.php it says in comments:

    | 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;

or

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

Could someone give me some clarification?

  • 写回答

1条回答 默认 最新

  • duanjuelian4640 2015-10-20 13:32
    关注

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

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签)
  • ¥50 sft下载大文阻塞卡死
  • ¥15 机器人轨迹规划相关问题
  • ¥15 word样式右侧翻页键消失
  • ¥15 springboot+vue 集成keycloak sso到阿里云
  • ¥15 win7系统进入桌面过一秒后突然黑屏
  • ¥30 backtrader对于期货交易的现金和资产计算的问题