2012-11-02 25 views
1

处理我读Error Handling但如果我用log_message('debug', 'Hi I m in Cart Controller');log_message('info', 'Hi I m in Cart Controller');它不记录任何消息,但只为log_message('error', 'Hi I m in Cart Controller');错误CI

任何想法,我的错误是什么工作?

回答

2

必须设置在app/config/config.php日志门槛:

/* 
|-------------------------------------------------------------------------- 
| Error Logging Threshold 
|-------------------------------------------------------------------------- 
| 
| 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 
| 
| For a live site you'll usually only enable Errors (1) to be logged otherwise 
| your log files will fill up very fast. 
| 
*/ 
$config['log_threshold'] = 2; 
+0

谢谢哥们不错 –