本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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());
示例5: setError
private function setError()
{
$str = $this->sql . '. error: ' . var_export($this->db->errorInfo(), true);
Factory::getSystemLog('sql')->push($str);
}
示例6: myExit
/**
* 终止程序函数
*/
function myExit($msg = '') {
//TODO 处理终止前程序
Factory::getSystemLog()->flush();
if ($msg) echo $msg;
exit();
}
示例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;
}
示例8: _exit
/**
* 退出中断程序
*/
private function _exit($str = '', $data = null)
{
if (!empty($str)) {
Factory::getSystemLog('wx_log')->push('system error' . $str, $data);
}
exit;
}