SimpleSAML_Error_Exception::logBacktrace PHP Method

logBacktrace() protected method

Print the backtrace to the log if the 'debug' option is enabled in the configuration.
protected logBacktrace ( $level = SimpleSAML\Logger::DEBUG )
    protected function logBacktrace($level = \SimpleSAML\Logger::DEBUG)
    {
        // see if debugging is enabled for backtraces
        $debug = SimpleSAML_Configuration::getInstance()->getArrayize('debug', array('backtraces' => false));
        if (!(in_array('backtraces', $debug, true) || array_key_exists('backtraces', $debug) && $debug['backtraces'] === true || array_key_exists(0, $debug) && $debug[0] === true)) {
            return;
        }
        $backtrace = $this->formatBacktrace();
        $callback = array('\\SimpleSAML\\Logger');
        $functions = array(\SimpleSAML\Logger::ERR => 'error', \SimpleSAML\Logger::WARNING => 'warning', \SimpleSAML\Logger::INFO => 'info', \SimpleSAML\Logger::DEBUG => 'debug');
        $callback[] = $functions[$level];
        foreach ($backtrace as $line) {
            call_user_func($callback, $line);
        }
    }