src/log/Logger.php
private static function generateStackTrace(array &$context) {
        if (!key_exists('trace', $context)) {
            $trace = DebugHelper::fixTrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), __FILE__, __LINE__);

            foreach ($trace as $i => $frame) {
                if (!isset($frame['class']) || $frame['class']!=__CLASS__)      // remove non-logger frames
                    break;
                unset($trace[$i]);
            }
            $context['trace'] = \array_values($trace);
        }
    }
private static function generateStackTrace(array &$context) {
        if (!key_exists('trace', $context)) {
            $trace = DebugHelper::fixTrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), __FILE__, __LINE__);

            foreach ($trace as $i => $frame) {
                if (!isset($frame['class']) || $frame['class']!=__CLASS__)      // remove non-logger frames
                    break;
                unset($trace[$i]);
            }
            $context['trace'] = \array_values($trace);
        }
    }
private static function generateStackTrace ( array & $ context ) { if ( ! key_exists ( 'trace' , $ context ) ) { $ trace = DebugHelper :: fixTrace ( debug_backtrace ( DEBUG_BACKTRACE_IGNORE_ARGS ) , __FILE__ , __LINE__ ) ; foreach ( $ trace as $ i => $ frame ) { if ( ! isset ( $ frame [ 'class' ] ) || $ frame [ 'class' ] != __CLASS__ ) // remove non-logger frames break ; unset ( $ trace [ $ i ] ) ; } $ context [ 'trace' ] = \ array_values ( $ trace ) ; } }
Generate an internal stacktrace and store it in the log context under the key "trace".

@param  array $context - reference to the log context
Generate an internal stacktrace and store it in the log context under the key trace .