本文整理汇总了PHP中Zend_Log::notice方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Log::notice方法的具体用法?PHP Zend_Log::notice怎么用?PHP Zend_Log::notice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Log
的用法示例。
在下文中一共展示了Zend_Log::notice方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testPWReplacements
/**
* test pw replacements
*/
public function testPWReplacements()
{
$config = Tinebase_Core::getConfig();
$logfile = tempnam(Tinebase_Core::getTempDir(), 'testlog');
$writer = new Zend_Log_Writer_Stream($logfile);
$formatter = new Tinebase_Log_Formatter();
$formatter->addReplacement($config->database->password);
$writer->setFormatter($formatter);
$this->_logger->addWriter($writer);
$filter = new Zend_Log_Filter_Priority(5);
$this->_logger->addFilter($filter);
$this->_logger->notice($config->database->password);
$loggerFile = file_get_contents($logfile);
$writer->shutdown();
unlink($logfile);
$this->assertFalse(strpos($loggerFile, $config->database->password), 'pw found!');
$this->assertContains('********', $loggerFile);
if ($config->logger->logruntime || $config->logger->logdifftime) {
$this->assertTrue(preg_match('/' . Tinebase_Core::getUser()->accountLoginName . ' \\d/', $loggerFile) === 1);
} else {
$this->assertContains(Tinebase_Core::getUser()->accountLoginName . ' - ', $loggerFile);
}
}
示例2: notice
/**
* Prio 5: Notice: normal but significant condition
*
* @param string $msg
* @param EngineBlock_Log_Message_AdditionalInfo $additionalInfo
* @return void
*/
public function notice($msg, $additionalInfo = null)
{
$this->_setAdditionalEventItems($additionalInfo);
parent::notice($msg);
}
示例3: notice
public static function notice($message)
{
self::$_logger->notice($message);
}
示例4: deleteAction
public function deleteAction()
{
if ($this->getRequest()->isPost()) {
$del = $this->getRequest()->getPost('del');
if ($del == 'Yes') {
$id = $this->getRequest()->getPost('id');
$albums = new Album_Model_DbTable_Albums();
$albums->deleteAlbum($id);
//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 a criticos
$filter = new Zend_Log_Filter_Priority(Zend_Log::INFO);
$this->logger = $logger->addFilter($filter);
$logger->notice('elimnar el album con id ' . $id);
}
$this->_helper->redirector('index');
} else {
$id = $this->_getParam('id', 0);
$albums = new Album_Model_DbTable_Albums();
$this->view->album = $albums->getAlbum($id);
}
}