コード例 #1
0
ファイル: helper_log.php プロジェクト: druphliu/dzzoffice
 public static function runlog($file, $message, $halt = 0)
 {
     global $_G;
     $nowurl = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
     $log = dgmdate($_G['timestamp'], 'Y-m-d H:i:s') . "\t" . $_G['clientip'] . "\t{$_G['uid']}\t{$nowurl}\t" . str_replace(array("\r", "\n"), array(' ', ' '), trim($message)) . "\n";
     helper_log::writelog($file, $log);
     if ($halt) {
         exit;
     }
 }
コード例 #2
0
 public function makeLog()
 {
     $put = '';
     foreach ($_REQUEST as $key => $value) {
         $value = is_array($value) ? $this->showArray($value) : $value;
         $put .= "[{$key}: {$value}] \n";
     }
     $sqlerror = '';
     $trace = $this->getTrace();
     if (!$trace[0]['line']) {
         $sqlerror = "Error: {$this->errorInfo['file']}(line: {$this->errorInfo['line']}) <br /> {$trace[0]['class']}{$trace[0]['type']}{$trace[0]['function']} \r\n";
     } else {
         foreach ($this->getTrace() as $key => $value) {
             if (isset($value['file'])) {
                 $sqlerror .= "\r\nError[{$key}]: {$value['file']}(line: {$value['line']}) [{$value['class']}{$value['type']}{$value['function']}]";
                 $sqlerror .= "\r\nArgs: (" . $this->showArray($value['args']) . ")";
             } else {
                 $sqlerror .= "\r\nError[{$key}]: [{$value['class']}{$value['type']}{$value['function']}]";
                 $sqlerror .= "\r\nArgs: (" . $this->showArray($value['args']) . ")";
             }
         }
     }
     helper_log::writeLog("Error-Msg:{$this->message},\n FileTrace: {$sqlerror}, \nDrive-Info: {$this->errorInfo['drive']}, Error-Url: {$_SERVER['QUERY_STRING']},\nGET&&POST:" . $put, $this->errorInfo['drive']);
 }
コード例 #3
0
function getuseraction($var)
{
    return helper_log::getuseraction($var);
}
コード例 #4
0
 public static function appSystemError()
 {
     if ($e = error_get_last()) {
         if (!in_array($e['type'], array(E_NOTICE, E_WARNING))) {
             $errorMessage = '[' . $e['type'] . '] ' . $e['message'] . ' In ' . $e['file'] . '(Line ' . $e['line'] . ')';
             debug($errorMessage, $e['type'], array('file' => $e['file'], 'line' => $e['line']));
         }
     }
     helper_log::saveLog();
 }
コード例 #5
0
ファイル: core.php プロジェクト: knowsee/uoke_framework
function logs($msg, $type = 'php')
{
    helper_log::writeLog($msg, $type);
}
コード例 #6
0
ファイル: log.class.php プロジェクト: knowsee/uoke_framework
 public static function runLog()
 {
     self::$_logWirteObj = array('begin' => smallTime());
 }
コード例 #7
0
ファイル: function_core.php プロジェクト: druphliu/dzzoffice
function writelog($file, $log)
{
    helper_log::writelog($file, $log);
}