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


PHP monitor_custom_event函數代碼示例

本文整理匯總了PHP中monitor_custom_event函數的典型用法代碼示例。如果您正苦於以下問題:PHP monitor_custom_event函數的具體用法?PHP monitor_custom_event怎麽用?PHP monitor_custom_event使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了monitor_custom_event函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: handle

 /**
  * Handle the error.
  *
  * @param string $errorMessage
  * @param string $debugMessage
  */
 public function handle($errorMessage, $debugMessage)
 {
     if ($this->zendPlatformAvailable()) {
         // log in zend platform
         $errMsg = implode(' | ', is_array($errorMessage) ? $errorMessage : array());
         if ($errMsg == '') {
             $errMsg = 'Something went terribly wrong, but there is no errormessage set...';
         } else {
             $errMsg = preg_replace('/\\[\\+.*s\\]/', '', $errMsg);
         }
         // get rid of timestamps because they will prevent ZP from finding duplicate errors
         monitor_custom_event(Tools::atktext('app_title'), $errMsg, true);
     }
 }
開發者ID:sintattica,項目名稱:atk,代碼行數:20,代碼來源:ZendPlatformErrorHandler.php

示例2: doWrite

 /**
  * Write a message to the log.
  *
  * @param array $event log data event
  * @return void
  */
 protected function doWrite(array $event)
 {
     $priority = $event['priority'];
     $message = $event['message'];
     unset($event['priority'], $event['message']);
     if (!empty($event)) {
         if ($this->isZendServer) {
             // On Zend Server; third argument should be the event
             zend_monitor_custom_event($priority, $message, $event);
         } else {
             // On Zend Platform; third argument is severity -- either
             // 0 or 1 -- and fourth is optional (event)
             // Severity is either 0 (normal) or 1 (severe); classifying
             // notice, info, and debug as "normal", and all others as
             // "severe"
             monitor_custom_event($priority, $message, $priority > 4 ? 0 : 1, $event);
         }
     } else {
         monitor_custom_event($priority, $message);
     }
 }
開發者ID:Flesh192,項目名稱:magento,代碼行數:27,代碼來源:ZendMonitor.php

示例3: _write

 /**
  * Write a message to the log.
  *
  * @param  array  $event  log data event
  * @return void
  */
 protected function _write($event)
 {
     $priority = $event['priority'];
     $message = $event['message'];
     unset($event['priority'], $event['message']);
     if (!empty($event)) {
         monitor_custom_event($priority, $message, false, $event);
     } else {
         monitor_custom_event($priority, $message);
     }
 }
開發者ID:bizanto,項目名稱:Hooked,代碼行數:17,代碼來源:ZendMonitor.php


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