【Laravel3.0.0源码阅读分析】错误配置文件error.php
作者:互联网
<?php
// 路径 application/config/error.php
return array(
/*
|--------------------------------------------------------------------------
| Ignored Error Levels
|--------------------------------------------------------------------------
| 忽略的错误级别
| Here you simply specify the error levels that should be ignored by the
| Laravel error handler. These levels will still be logged; however, no
| information about about them will be displayed.
| 在这里,你只需指定Laravel错误处理程序应忽略的错误级别。
| 这些级别仍将被记录; 但是,将不会显示有关它们的任何信息。
*/
// E_NOTICE-运行时通知 E_USER_NOTICE-用户生成的通知消息 E_DEPRECATED-运行时通知 E_USER_DEPRECATED-用户生成的通知消息
'ignore' => array(E_NOTICE, E_USER_NOTICE, E_DEPRECATED, E_USER_DEPRECATED),
/*
|--------------------------------------------------------------------------
| Error Detail
|--------------------------------------------------------------------------
| 错误详情
| Detailed error messages contain information about the file in which an
| error occurs, as well as a PHP stack trace containing the call stack.
| You'll want them when you're trying to debug your application.
| 详细的错误消息包含有关发生错误的文件的信息,以及包含调用堆栈的PHP堆栈跟踪。在尝试调试应用程序时会需要它们。
| If your application is in production, you'll want to turn off the error
| details for enhanced security and user experience since the exception
| stack trace could contain sensitive information.
| 如果您的应用程序正在生产中,则您将需要关闭错误,并希望关闭错误详细信息以增强安全性和用户体验,因为异常堆栈跟踪可能包含敏感信息。
*/
'detail' => true,
/*
|--------------------------------------------------------------------------
| Error Logging
|--------------------------------------------------------------------------
| 错误记录
| When error logging is enabled, the "logger" Closure defined below will
| be called for every error in your application. You are free to log the
| errors however you want. Enjoy the flexibility.
| 启用错误记录后,下面定义的logger闭包将会在应用的每一处发生错误时被调用。
| 您可以自由记录你想要的错误。 享受灵活性。
*/
'log' => false,
/*
|--------------------------------------------------------------------------
| Error Logger
|--------------------------------------------------------------------------
| 错误记录器
| Because of the various ways of managing error logging, you get complete
| flexibility to manage error logging as you see fit. This function will
| be called anytime an error occurs within your application and error
| logging is enabled.
| 由于管理错误日志的方式多种多样,因此您可以完全灵活地采用自己认为合适的错误日志。
| 每当您的应用程序中发生错误并启用错误日志记录时,就会调用此函数。
| You may log the error message however you like; however, a simple log
| solution has been setup for you which will log all error messages to
| text files within the application storage directory.
| 您可以根据自己的喜好记录错误消息;
| 但是,一个简单的日志解决方案已经为您设置好了,它将所有错误消息记录到应用程序存储目录中的文本文件。
*/
'logger' => function($exception)
{
Log::exception($exception);
},
/*
|--------------------------------------------------------------------------
| PHP INI Display Errors Setting
|--------------------------------------------------------------------------
| PHP INI显示错误设置
| Here you may specify the display_errors setting of the PHP.ini file.
| Typically you may keep this "Off", as Laravel will cleanly handle
| the display of all errors.
| 在这里,您可以指定PHP.ini文件的display_errors设置。
| 通常,您可以将此选项保持为“关闭”,因为Laravel会干净地处理所有错误的显示。
| However, if you encounter an infamous white screen of death scenario,
| turning this "On" may help you solve the problem by getting the
| real error message being thrown by the application.
| 但是,如果遇到臭名昭著的死亡白屏,将此功能设为“开启”,或许可以通过应用中获取的实时的错误信息能帮助你解决问题
*/
'display' => 'Off',
);
github地址: https://github.com/liu-shilong/laravel3-scr
标签:配置文件,错误,Laravel3.0,application,源码,error,---------------------------------------- 来源: https://blog.csdn.net/qq2942713658/article/details/117304904