本文整理汇总了PHP中Zend_Log::alert方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Log::alert方法的具体用法?PHP Zend_Log::alert怎么用?PHP Zend_Log::alert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Log
的用法示例。
在下文中一共展示了Zend_Log::alert方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editAction
public function editAction()
{
$this->view->title = "Edit album";
$form = new Album_Form_Album();
$form->submit->setLabel('Save');
$this->view->form = $form;
if ($this->getRequest()->isPost()) {
$formData = $this->getRequest()->getPost();
if ($form->isValid($formData)) {
$id = (int) $form->getValue('id');
$artist = $form->getValue('artist');
$title = $form->getValue('title');
$albums = new Album_Model_DbTable_Albums();
$albums->updateAlbum($id, $artist, $title);
//Inicializamos el log
$logger = new Zend_Log();
//Aqui ponemos las salida por archivo
$writer = new Zend_Log_Writer_Stream('../log/zfw.log');
$logger->addWriter($writer);
//Aqui indicamos que solo se mostraran los mensajes que sean iguales o superiores al filtro
$filter = new Zend_Log_Filter_Priority(Zend_Log::INFO);
$logger->addFilter($filter);
$logger->alert('actualiza la informacion del title ' . $title);
$this->_helper->redirector('index');
} else {
$form->populate($formData);
}
} else {
$id = $this->_getParam('id', 0);
if ($id > 0) {
$albums = new Album_Model_DbTable_Albums();
$form->populate($albums->getAlbum($id));
}
}
}
示例2: alert
/**
* Prio 1: Alert: action must be taken immediately
*
* @param string $msg
* @param EngineBlock_Log_Message_AdditionalInfo $additionalInfo
* @return void
*/
public function alert($msg, $additionalInfo = null)
{
$this->_setAdditionalEventItems($additionalInfo);
parent::alert($msg);
}
示例3: alert
public static function alert($message)
{
self::$_logger->alert($message);
}