当前位置: 首页>>代码示例>>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;未经允许,请勿转载。