roundcubemail/program/lib/Roundcube/rcube.php
public static function debug($engine, $data, $result = null)
    {
        static $debug_counter;

        $line = '[' . (++$debug_counter[$engine]) . '] ' . $data;

        if (($len = strlen($line)) > self::DEBUG_LINE_LENGTH) {
            $diff = $len - self::DEBUG_LINE_LENGTH;
            $line = substr($line, 0, self::DEBUG_LINE_LENGTH) . "... [truncated $diff bytes]";
        }

        if ($result !== null) {
            $line .= ' [' . ($result ? 'TRUE' : 'FALSE') . ']';
        }

        self::write_log($engine, $line);
    }
public static function debug($engine, $data, $result = null)
    {
        static $debug_counter;

        $line = '[' . (++$debug_counter[$engine]) . '] ' . $data;

        if (($len = strlen($line)) > self::DEBUG_LINE_LENGTH) {
            $diff = $len - self::DEBUG_LINE_LENGTH;
            $line = substr($line, 0, self::DEBUG_LINE_LENGTH) . "... [truncated $diff bytes]";
        }

        if ($result !== null) {
            $line .= ' [' . ($result ? 'TRUE' : 'FALSE') . ']';
        }

        self::write_log($engine, $line);
    }
public static function debug ( $ engine , $ data , $ result = null ) { static $ debug_counter ; $ line = '[' . ( ++ $ debug_counter [ $ engine ] ) . '] ' . $ data ; if ( ( $ len = strlen ( $ line ) ) > self :: DEBUG_LINE_LENGTH ) { $ diff = $ len - self :: DEBUG_LINE_LENGTH ; $ line = substr ( $ line , 0 , self :: DEBUG_LINE_LENGTH ) . "... [truncated $diff bytes]" ; } if ( $ result !== null ) { $ line .= ' [' . ( $ result ? 'TRUE' : 'FALSE' ) . ']' ; } self :: write_log ( $ engine , $ line ) ; }
Write debug info to the log

@param string $engine Engine type - file name (memcache, apc)
@param string $data   Data string to log
@param bool   $result Operation result
Write debug info to the log