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


PHP Factory::getSystemLog方法代碼示例

本文整理匯總了PHP中Factory::getSystemLog方法的典型用法代碼示例。如果您正苦於以下問題:PHP Factory::getSystemLog方法的具體用法?PHP Factory::getSystemLog怎麽用?PHP Factory::getSystemLog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Factory的用法示例。


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

示例1: setError

 public static function setError($errCode, $errMsg)
 {
     self::$errCode = $errCode;
     self::$errMsg = $errMsg;
     //保存下錯誤.
     $str = 'errCOde=' . $errCode . ';errMsg=' . $errMsg . ';';
     $arr = array($_GET, $_POST);
     Factory::getSystemLog()->push($str, $arr);
 }
開發者ID:zhongyu2005,項目名稱:demo,代碼行數:9,代碼來源:Error.class.php

示例2: errorHandler

 /**
  * 錯誤監聽
  */
 public static function errorHandler($errno, $errstr, $errfile, $errline)
 {
     $err_msg = "信息:{$errno}。內容:{$errstr},發生在文件{$errfile}的{$errline}行";
     switch ($errno) {
         case E_ERROR:
         case E_PARSE:
         case E_CORE_ERROR:
         case E_COMPILE_ERROR:
         case E_USER_ERROR:
             break;
         default:
             # code...
             break;
     }
     Factory::getSystemLog('php')->push($err_msg);
     return true;
 }
開發者ID:zhongyu2005,項目名稱:demo,代碼行數:20,代碼來源:Bt.class.php

示例3: getMemberCardUserInfo

    /**
     * 查看會員信息
     */
    public function getMemberCardUserInfo($data) {
        $url = sprintf(self::get_member_card_user_info, $this->_token);
        $json = code_unescaped($data);
        $result = WeiXinApiRequest::post($url, $json, false, false);
        // 寫入係統日誌
        $this->_debug && Factory::getSystemLog()->push("getMemberCardUserInfo  拉取會員信息(積分查詢)接口:", array(
                    'data' => $data,
                    'json' => $json,
                    'result' => $result
        ));

        if ($result ['errcode'] != 0) {
            $this->error = array(
                'errcode' => $result ['errcode'],
                'errmsg' => $result ['errmsg']
            );
            return $this->error;
        }
        return $result;
    }
開發者ID:neil-chen,項目名稱:NeilChen,代碼行數:23,代碼來源:AdminModel.class.php

示例4: set_time_limit

<?php
set_time_limit(0);
define("LIB_PATH", dirname(__FILE__));
define("APP_NAME", 'HuiShi');
error_reporting(E_ALL);
ini_set("display_errors", true);
date_default_timezone_set('PRC');

include_once LIB_PATH . '/../../SuiShiPHP/SuiShiPHP.class.php';
include_once LIB_PATH . '/../../SuiShiPHP/Log/SystemLog.class.php';
include_once LIB_PATH . '/../../SuiShiPHP/Cache/RedisCache.class.php';
include_once LIB_PATH . '/Common/String.class.php';
include_once LIB_PATH . '/Config/Config.php';
//include_once LIB_PATH . '/Config/Define.Config.php';
include_once LIB_PATH . '/Common/Function.php';
include_once LIB_PATH . '/Common/Page.class.php';
include_once LIB_PATH . '/Common/Image.class.php';

SuiShiPHP::init(Config::$_CONFIGS);

Factory::getSystemLog()->start();
Factory::getSystemLog()->push("http param", HttpRequest::get());
開發者ID:neil-chen,項目名稱:NeilChen,代碼行數:22,代碼來源:Init.php

示例5: setError

 private function setError()
 {
     $str = $this->sql . '. error: ' . var_export($this->db->errorInfo(), true);
     Factory::getSystemLog('sql')->push($str);
 }
開發者ID:zhongyu2005,項目名稱:demo,代碼行數:5,代碼來源:Db.class.php

示例6: myExit

/**
 * 終止程序函數
 */
function myExit($msg = '') {
	//TODO 處理終止前程序
	Factory::getSystemLog()->flush();
	if ($msg) echo $msg;
	exit();
}
開發者ID:neil-chen,項目名稱:NeilChen,代碼行數:9,代碼來源:FunctionsBase.php

示例7: code_info

	public function code_info($code, $card_id) {
		$url = sprintf(self::code_info, $this->token);
		
		$json = code_unescaped(array('code'=>$code, 'card_id'=>$card_id));
		$result = WeiXinApiRequest::post($url, $json, false, false);
		
		//寫入係統日誌
		$this->debug && Factory::getSystemLog()->push("CardPacket code_info獲取卡券領取信息:", array('code'=>$code, 'card_id'=>$card_id, 'result'=>$result));
		
		if($result['errcode']==0){
			return $result['openid'];
		}
		
		return FALSE;
	}
開發者ID:neil-chen,項目名稱:NeilChen,代碼行數:15,代碼來源:CardPacket.class.php

示例8: _exit

 /**
  * 退出中斷程序
  */
 private function _exit($str = '', $data = null)
 {
     if (!empty($str)) {
         Factory::getSystemLog('wx_log')->push('system error' . $str, $data);
     }
     exit;
 }
開發者ID:zhongyu2005,項目名稱:demo,代碼行數:10,代碼來源:WxMessageHand.class.php


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