Laravel Classroom image

Prashant  Nigam / Student / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2 | 3|Last
Lessons:-Debugging Applications

23.2 Error Configuration
We don’t always want our errors to show in this way, especially on a production site where
showing a stacktrace could pose a significant security risk.
Fortunately, and as always, Laravel has made it easy for us to change the configuration for
the display of errors. The configuration file for the error reporting system can be found at
application/config/error.php. Let’s have a run through the configuration options that are
contained in this array.
1 'ignore' => array(),
The ignore array contains a list of errors that are to be ignored by the error handler. Although
these errors will no longer be displayed when they are encountered, they will always be logged.
Keep this in mind when using the ignore array.
To add an error type to this array, add the PHP error type constant, or an integer value to the
array.
1 'ignore' => array(E_ERROR);
A full list of PHP error type constants can be found on the PHP API, however here are some of
the more useful ones.
E_ERROR This will match all fatal run time errors.
E_WARNING This constant will match all warning, or non fatal type errors.
E_PARSE This constant will match all parse time errors, or syntax errors.
E_NOTICE This constant will match all run time notices.
E_ALL This constant will match all of the above, except for E_STRICT errors.
1 'detail' => true,
The detail config option can be used to switch the detailed error reporting on or off. When
enabled (true) it will show the full error report along with stack trace as shown above. Disabling
this option (false) will cause the default error 500 page to be displayed instead.1 'log' => false,
If the log config option is set to true, the closure contained within the logger config option will
be executed with each error, and passed an exception object.
1 'logger' => function($exception)
2 {
3 Log::exception($exception);
4 },
By default, the closure contained within the logger config option will write an entry to a log file
within the storage/logs. However, providing a closure has provided a great deal of flexibility,
allowing you to override the default logging method with anything you can think of. Perhaps
you would prefer to log to a database? Make it so number 1! Engage.

 

 
 
 

Prashant  Nigam

Skills    Laravel

Qualifications :-
Location :-,,,
Description:-
Explore
 

  Students (0)