public function close() { parent::close(); if ($this->isCurrentSessionExceeded()) { $this->log->error(sprintf("[SessionLock] Session lock was held for %s seconds which is longer than the maximum of %s seconds. Request details: \n SERVER_NAME | %s \n SERVER_ADDR | %s \n SCRIPT_FILENAME | %s \n REQUEST_METHOD | %s \n SCRIPT_NAME | %s \n REQUEST_URI | %s \n QUERY_STRING | %s ", $this->session_time, $this->max_session_time, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_ADDR'], $_SERVER['SCRIPT_FILENAME'], $_SERVER['REQUEST_METHOD'], $_SERVER['SCRIPT_NAME'], $_SERVER['REQUEST_URI'], $_SERVER['QUERY_STRING'])); } }
protected function reportException($message, $e) { $this->logger->fatal("{$message}: " . get_class($e)); if ($this->logger->wouldLog('error')) { $this->logger->error($e->getMessage()); } }
/** * Prepare statement for execution * @param string $sql SQL string to prepare * @param array $lobs names of clob and blob fields from query * @param string $msg Error message * @return false|PreparedStatement */ public function prepareStatement($sql, array $lobs = array(), $msg = '') { if (!$this->parseSQL($sql, $lobs)) { $this->log->error("{$msg}: SQL parse failed: {$this->sqlText}"); return false; } // Prepare the statement in the concrete database $preparedStatementHndl = $this->preparePreparedStatement(); if (empty($preparedStatementHndl)) { return false; } return $this; }