[英]Error log in PHP Codeigniter Framework
我目前使用Codeigniter作为默认框架来创建一些项目。 但是,当我将项目上载到服务器上时,三天三天后,错误日志已在服务器上达到1 mb以上。 如何忽略此错误日志? 错误日志是否由我的服务器或Codeigniter本身引起?
非常感谢您的帮助。
假设这是你指的是笨错误日志,请检查您config.php
为log_threshold
设置并将其设置为0
禁用错误日志记录:
/*
|--------------------------------------------------------------------------
| 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'] = 0;
通常,至少在开发过程中,我通常将其设置为1
。 如果确实启用错误日志记录,则应阅读错误日志并在可能的情况下更正错误,否则将毫无意义。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.