本文整理汇总了PHP中LoggerManager::error方法的典型用法代码示例。如果您正苦于以下问题:PHP LoggerManager::error方法的具体用法?PHP LoggerManager::error怎么用?PHP LoggerManager::error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LoggerManager
的用法示例。
在下文中一共展示了LoggerManager::error方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: close
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']));
}
}
示例2: reportException
protected function reportException($message, $e)
{
$this->logger->fatal("{$message}: " . get_class($e));
if ($this->logger->wouldLog('error')) {
$this->logger->error($e->getMessage());
}
}
示例3: prepareStatement
/**
* 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;
}