Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.10.3
-
None
-
None
-
MOODLE_310_STABLE
Description
Why default_excetion_handler doesn't log all exceptions and errors into the PHP log. Printing them on a screen might be useful but it is hard to track errors triggered by a general user.
https://github.com/moodle/moodle/blob/master/lib/setuplib.php#L374
https://github.com/moodle/moodle/blob/18aafd0ed4d89447cf7a6ac54c8aa7b710299563/lib/setuplib.php#L461
Why for example this stack trace which is really valid from point of site maintainer (error in custom theme) is not recorded?
My suggestion is that all exceptions should be logged into a log file?
Array
(
[0] => Array
(
[file] => /var/www/moodle/theme/ctufeet/layout/default.php
[line] => 22
[exception] => Exception
)
[1] => Array
(
[file] => /var/www/moodle/theme/ctufeet/layout/default.php
[line] => 13
[function] => write_course_data
)
[2] => Array
(
[file] => /var/www/moodle/lib/outputrenderers.php
[line] => 1374
[args] => Array
(
[0] => /var/www/moodle/theme/ctufeet/layout/default.php
)
[function] => include
)
[3] => Array
(
[file] => /var/www/moodle/lib/outputrenderers.php
[line] => 1304
[function] => render_page_layout
[class] => core_renderer
[type] => ->
)
[4] => Array
(
[file] => /var/www/moodle/course/view.php
[line] => 253
[function] => header
[class] => core_renderer
[type] => ->
)
)