It is a very nice idea to include debug_backtrace information in the error mails, but the way it works in 2.0 now is creating huge problems when the backtrace contains function calls with large arguments, such as Forms API functions.
My site crashed because it tried to send a 2 MB debug backtrace due to an error in Form processing. This crash was caused by the fact that I use the HTML mail module, and that module could not handle this amount of data. However, as a 2MB debug backtrace is pointless, I think it is best that the logging and alerts module is changed such that it's not simply a print_r() of debug_backtrace(), but rather a portion of this data, such as function name, file name and line number. This will lead to smaller output, that is both managable by the HTML mail module and useful as debug tool.
Comments
Comment #1
maciej.zgadzaj commentedThanks for reporting this Jorrit.
I have added new
hook_emaillog_debug_info_alter(&$debug_info)providing option to alter additional debug info array before adding it to alert email. Also its internal implementationemaillog_emaillog_debug_info_alter(), which replaces all argument variables with their types only (this could be switched off in module configuration if required).This way by default full argument values will not be included in emails anymore, and other modules could easily additionally alter how debug info is presented in the email.
New versions just pushed to 6.x-2.x-dev and 7.x-2.x-dev branches.
Comment #2
Jorrit commentedThanks!