1

我阅读了错误处理,但如果我使用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');

知道我的错误是什么吗?

4

1 回答 1

2

You have to set the log threshold in 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;
于 2012-11-02T08:41:47.820 回答