예제 #1
0
파일: Dog_Log.php 프로젝트: sinfocol/gwf3
 public static function debug($message)
 {
     echo $message . PHP_EOL;
     GWF_Log::rawLog('dog/debug', $message);
     GWF_Log::flush();
     return true;
 }
예제 #2
0
 public function queryRead($query)
 {
     $t = microtime(true);
     if (false === ($result = mysql_query($query, $this->link))) {
         $this->error($query, mysql_errno($this->link), mysql_error($this->link));
         return false;
     }
     $time = microtime(true) - $t;
     $this->query_time += $time;
     $this->query_count++;
     $this->queries_opened++;
     if (GDO_Database::DEBUG) {
         GWF_Log::rawLog(self::DEBUG_PATH, sprintf('Q#%03d(%.03fs): %s', $this->query_count, $time, $query));
     }
     return $result;
 }