當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Log::notice方法代碼示例

本文整理匯總了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);
     }
 }
開發者ID:bitExpert,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:26,代碼來源:FormatterTest.php

示例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);
 }
開發者ID:newlongwhitecloudy,項目名稱:OpenConext-engineblock,代碼行數:12,代碼來源:Log.php

示例3: notice

 public static function notice($message)
 {
     self::$_logger->notice($message);
 }
開發者ID:nagyistoce,項目名稱:lanmediaservice-lms-lib,代碼行數:4,代碼來源:Debug.php

示例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);
     }
 }
開發者ID:roigrande,項目名稱:globalpms,代碼行數:25,代碼來源:IndexController.php


注:本文中的Zend_Log::notice方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。