Skip to content

Commit

Permalink
Merge branch 'w16_MDL-45049_m27_debugging' of https://github.com/skod…
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Apr 21, 2014
2 parents eec3795 + 169ccfa commit b576d3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/weblib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2840,7 +2840,7 @@ function debugging($message = '', $level = DEBUG_NORMAL, $backtrace = null) {
if (!$backtrace) {
$backtrace = debug_backtrace();
}
$from = format_backtrace($backtrace, CLI_SCRIPT);
$from = format_backtrace($backtrace, CLI_SCRIPT || NO_DEBUG_DISPLAY);
if (PHPUNIT_TEST) {
if (phpunit_util::debugging_triggered($message, $level, $from)) {
// We are inside test, the debug message was logged.
Expand All @@ -2851,7 +2851,7 @@ function debugging($message = '', $level = DEBUG_NORMAL, $backtrace = null) {
if (NO_DEBUG_DISPLAY) {
// Script does not want any errors or debugging in output,
// we send the info to error log instead.
error_log('Debugging: ' . $message . $from);
error_log('Debugging: ' . $message . ' in '. PHP_EOL . $from);

} else if ($forcedebug or $CFG->debugdisplay) {
if (!defined('DEBUGGING_PRINTED')) {
Expand Down

0 comments on commit b576d3f

Please sign in to comment.