/** * @brief 回滚 * * @return */ public function rollback() { Bd_Profiler::start(); $ret = $this->mysql->rollback(); $arrInfo = array('ns' => $this->dbConf['dbname'], 'query' => $query, 'retry' => 1, 'local_ip' => $_SERVER['SERVER_ADDR'], 'remote_ip' => $this->dbConf['host'] . ':' . $this->dbConf['port'], 'res_len' => $ret); Bd_Profiler::end($arrInfo); return $ret; }
private static function _enableProfiling() { if (!self::$bolInit) { $arrConf = Bd_Conf::getConf('profiler/log'); if (false !== $arrConf) { self::$enableProfiling = isset($arrConf['level']) ? (bool) $arrConf['level'] : true; self::$maxLogNum = isset($arrConf['maxlognum']) ? (int) $arrConf['maxlognum'] : 100; } self::$bolInit = true; } return self::$enableProfiling; }
public static function notice($errno = 0, $errmsg = '') { Bd_Profiler::dumpProfInfo(); Bd_Log::notice($errmsg, $errno); }