Back to index

d-push  2.0
Classes | Functions
zlog.php File Reference

Go to the source code of this file.

Classes

class  ZLog

Functions

 debugLog ($message)
 
Legacy debug stuff
 zarafa_error_handler ($errno, $errstr, $errfile, $errline, $errcontext)

Function Documentation

debugLog ( message)


Legacy debug stuff

Definition at line 221 of file zlog.php.

                            {
    ZLog::Write(LOGLEVEL_DEBUG, $message);
}

Here is the call graph for this function:

Here is the caller graph for this function:

zarafa_error_handler ( errno,
errstr,
errfile,
errline,
errcontext 
)

Definition at line 226 of file zlog.php.

                                                                                {
    $bt = debug_backtrace();
    switch ($errno) {
        case 8192:      // E_DEPRECATED since PHP 5.3.0
            // do not handle this message
            break;

        case E_NOTICE:
        case E_WARNING:
            // TODO check if there is a better way to avoid these messages
            if (stripos($errfile,'interprocessdata') !== false && stripos($errstr,'shm_get_var()') !== false)
                break;
            ZLog::Write(LOGLEVEL_WARN, "$errfile:$errline $errstr ($errno)");
            break;

        default:
            ZLog::Write(LOGLEVEL_ERROR, "trace error: $errfile:$errline $errstr ($errno) - backtrace: ". (count($bt)-1) . " steps");
            for($i = 1, $bt_length = count($bt); $i < $bt_length; $i++) {
                $file = $line = "unknown";
                if (isset($bt[$i]['file'])) $file = $bt[$i]['file'];
                if (isset($bt[$i]['line'])) $line = $bt[$i]['line'];
                ZLog::Write(LOGLEVEL_ERROR, "trace: $i:". $file . ":" . $line. " - " . ((isset($bt[$i]['class']))? $bt[$i]['class'] . $bt[$i]['type']:""). $bt[$i]['function']. "()");
            }
            //throw new Exception("An error occured.");
            break;
    }
}

Here is the call graph for this function: