Created
October 19, 2016 13:30
-
-
Save dchatry/6462a8cb9694e072180df6d27d831601 to your computer and use it in GitHub Desktop.
[Drupal] Watchdog backtrace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS); | |
$variables = array('@backtrace' => json_encode($backtrace, JSON_PRETTY_PRINT)); | |
watchdog('MODULE', 'Things happend, here\'s a backtrace:<br><pre>@backtrace</pre>', $variables, WATCHDOG_ERROR); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment