本文整理汇总了PHP中Logging::error方法的典型用法代码示例。如果您正苦于以下问题:PHP Logging::error方法的具体用法?PHP Logging::error怎么用?PHP Logging::error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logging
的用法示例。
在下文中一共展示了Logging::error方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: connect
/**
* open database connection, select database and return link identifier or FALSE
* @return resource|bool link identifier or FALSE in case of any error
*/
function connect()
{
$this->_log->trace("opening db connection (host=" . $this->host . ", user=" . $this->user . ")");
$db_link = @mysql_connect($this->host, $this->user, $this->passwd);
if (!$db_link) {
$this->error_str = "unable to connect to database (host=" . $this->host . ", user=" . $this->user . ")";
$this->_log->error($this->error_str);
return FALSE;
}
$succes = mysql_select_db($this->database, $db_link);
if (!$succes) {
$this->error_str = "unable to select database (db=" . $this->database . ")";
$this->_log->error($this->error_str);
return FALSE;
}
return $db_link;
}
示例2: eventFeedPreloadAction
public function eventFeedPreloadAction()
{
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
$editable = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
$calendar_interval = Application_Model_Preference::GetCalendarTimeScale();
Logging::info($calendar_interval);
if ($calendar_interval == "agendaDay") {
list($start, $end) = Application_Model_Show::getStartEndCurrentDayView();
} else {
if ($calendar_interval == "agendaWeek") {
list($start, $end) = Application_Model_Show::getStartEndCurrentWeekView();
} else {
if ($calendar_interval == "month") {
list($start, $end) = Application_Model_Show::getStartEndCurrentMonthView();
} else {
Logging::error("Invalid Calendar Interval '{$calendar_interval}'");
}
}
}
$events =& Application_Model_Show::getFullCalendarEvents($start, $end, $editable);
$this->view->events = $events;
}
示例3:
/**
* log given log message and set error string and error message string
* @param string log_message human readable log message for this error
* @param string error_message error message for user
* @return void
*/
function _handle_error($log_message, $error_message)
{
if (strlen($log_message) > 0) {
$this->_log->error($log_message);
$this->error_log_str = $log_message;
} else {
$this->error_log_str = "";
}
if (strlen($this->_database->get_error_str()) > 0) {
$this->_log->error("database error: " . $this->_database->get_error_str());
$this->error_str = $this->_database->get_error_str();
} else {
$this->error_str = "";
}
$this->error_message_str = $error_message;
}
示例4: delete
/**
* Delete stored virtual file
*
* @param boolean $p_deleteFile
*
*/
public function delete()
{
$filepath = $this->getFilePath();
// Check if the file is scheduled to be played in the future
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
throw new DeleteScheduledFileException();
}
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
if (!$isAdminOrPM && $this->getFileOwnerId() != $user->getId()) {
throw new FileNoPermissionException();
}
$music_dir = Application_Model_MusicDir::getDirByPK($this->_file->getDbDirectory());
$type = $music_dir->getType();
if (file_exists($filepath) && $type == "stor") {
$data = array("filepath" => $filepath, "delete" => 1);
try {
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
} catch (Exception $e) {
Logging::error($e->getMessage());
return;
}
}
// set hidden flag to true
$this->_file->setDbHidden(true);
$this->_file->save();
// need to explicitly update any playlist's and block's length
// that contains the file getting deleted
$fileId = $this->_file->getDbId();
$plRows = CcPlaylistcontentsQuery::create()->filterByDbFileId()->find();
foreach ($plRows as $row) {
$pl = CcPlaylistQuery::create()->filterByDbId($row->getDbPlaylistId($fileId))->findOne();
$pl->setDbLength($pl->computeDbLength(Propel::getConnection(CcPlaylistPeer::DATABASE_NAME)));
$pl->save();
}
$blRows = CcBlockcontentsQuery::create()->filterByDbFileId($fileId)->find();
foreach ($blRows as $row) {
$bl = CcBlockQuery::create()->filterByDbId($row->getDbBlockId())->findOne();
$bl->setDbLength($bl->computeDbLength(Propel::getConnection(CcBlockPeer::DATABASE_NAME)));
$bl->save();
}
}