function rules_show_debug_output

Returns whether the debug log should be shown.

2 calls to rules_show_debug_output()
rules_exit in ./rules.module
Implements hook_exit().
rules_page_build in ./rules.module
Implements hook_page_build() to add the rules debug log to the page bottom.

File

./rules.module, line 1463

Code

function rules_show_debug_output() {
    // For performance avoid unnecessary auto-loading of the RulesLog class.
    if (!class_exists('RulesLog', FALSE)) {
        return FALSE;
    }
    if (variable_get('rules_debug', 0) == RulesLog::INFO && user_access('access rules debug')) {
        return TRUE;
    }
    return variable_get('rules_debug', 0) == RulesLog::WARN && user_access('access rules debug') && RulesLog::logger()->hasErrors();
}