当前位置: 首页>>代码示例>>PHP>>正文


PHP Doo::logger方法代码示例

本文整理汇总了PHP中Doo::logger方法的典型用法代码示例。如果您正苦于以下问题:PHP Doo::logger方法的具体用法?PHP Doo::logger怎么用?PHP Doo::logger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doo的用法示例。


在下文中一共展示了Doo::logger方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 /**
  * db 处理统一接口
  */
 public function execute($sql = '', $type = 's')
 {
     $res['status'] = 1;
     $dbRes = false;
     switch ($type) {
         //select
         case 's':
             $dbRes = mysqli_query($this->conn, $sql);
             $data = $this->fetch_all_result($dbRes, 1);
             $res['data'] = $data[0];
             break;
             //insert
         //insert
         case 'i':
             $dbRes = mysqli_query($this->conn, $sql);
             $res['id'] = mysqli_insert_id($this->conn);
             break;
             //update
         //update
         case 'u':
             $dbRes = mysqli_query($this->conn, $sql);
             break;
             //delete
         //delete
         case 'd':
             $dbRes = mysqli_query($this->conn, $sql);
             break;
         default:
             # code...
             break;
     }
     if ($dbRes == true) {
         $res['status'] = 0;
     }
     Doo::logger()->info('time:' . date("Y-m-d H:i:s", time()) . "\tip:" . getIP() . "\tsql:" . $sql . "\t" . var_export($res['status'], true), 'DB');
     return $res;
 }
开发者ID:aising,项目名称:ding,代码行数:40,代码来源:Mysql.php

示例2: get_new_movie_by_category

 function get_new_movie_by_category($cat, $search = "", $start = 0, $limit = 20)
 {
     $cache_name = 'get_new_movie_by_category_' . $cat . $search;
     $qsearch = "";
     if ($search) {
         $qsearch = " AND ( ov.vod_name like '{$search}%' OR ov.vod_name like '%{$search}%'  OR ov.vod_name like '%{$search}' ) ";
     }
     /* 		$query = "SELECT * 
     			  FROM tv_category_item tci
     			  LEFT JOIN tv_program tp ON (tci.content_code = tp.code)
     			  LEFT JOIN tv_video tv ON (tci.content_code = tv.content_code)
     			  WHERE tci.category_code = '{$cat}' AND tci.visible_status = 0 {$qsearch} ORDER BY tci.insert_time DESC"; */
     $query = "SELECT ov.*, ovrc.*, ovc.*, ov.id as vod_id FROM {$this->db_ottmobile}.ott_vod ov \n\t\t\t\t  INNER JOIN {$this->db_ottmobile}.ott_vod_relation_category ovrc ON (ov.id = ovrc.vod_id)\n\t\t\t\t  INNER JOIN {$this->db_ottmobile}.ott_vod_category ovc ON (ovrc.vod_category_id = ovc.id )\n\t\t\t\t  WHERE ovc.vod_category_code ='{$cat}' and ovc.vod_category_status='publish' and ov.vod_status='publish' GROUP BY ov.id ORDER BY episode_group asc, vod_name asc\n\t\t\t\t  LIMIT {$start}, {$limit}";
     //echo $query;
     try {
         //$rs = $this->cache->get($cache_name);
         //if(!$rs || $this->clearcache){
         $rs = $this->dbMobile()->fetchAll($query);
         //	$this->cache->set($cache_name,$rs,$this->cache_time);
         //}
     } catch (Exception $e) {
         Doo::logger()->alert($e);
         Doo::logger()->writeLogs("log" + date('Y-m-d') + ".txt", false);
     }
     return $rs;
 }
开发者ID:berlianaputri,项目名称:rps,代码行数:26,代码来源:Movie.php

示例3: getRegion

 function getRegion()
 {
     $query = "SELECT region_code, region FROM ott_geoip_region WHERE country_code ='ID'";
     try {
         $rs = $this->dbMobile()->fetchAll($query);
     } catch (Exception $e) {
         Doo::logger()->alert($e);
         Doo::logger()->writeLogs("log" + date('Y-m-d') + ".txt", false);
     }
     return $rs;
 }
开发者ID:berlianaputri,项目名称:rps,代码行数:11,代码来源:General.php

示例4: date

include '../protected/config/common.conf.php';
include '../protected/config/routes.default.conf.php';
include '../protected/config/db.default.conf.php';
include '../protected/config/timezone.conf.php';
include '../protected/config/area.conf.php';
include '../protected/module/default/class/func.php';
// 旧方法库
#Just include this for production mode
//include $config['BASE_PATH'].'deployment/deploy.php';
include $config['BASE_PATH'] . 'Doo.php';
include $config['BASE_PATH'] . 'app/DooConfig.php';
# Uncomment for auto loading the framework classes.
//spl_autoload_register('Doo::autoload');
Doo::conf()->set($config);
# remove this if you wish to see the normal PHP error view.
include $config['BASE_PATH'] . 'diagnostic/debug.php';
# database usage
//Doo::useDbReplicate();	#for db replication master-slave usage
//Doo::db()->setMap($dbmap);
Doo::conf()->add('dbconfig', $dbconfig);
Doo::loadClassAt('DBproxy', 'default');
// Doo::db()->setDb($dbconfig, $config['APP_MODE']);
// Doo::db()->sql_tracking = true;	#for debugging/profiling purpose
Doo::app()->route = $route;
# Uncomment for DB profiling
//Doo::logger()->beginDbProfile('doowebsite');
Doo::app()->run();
//Doo::logger()->endDbProfile('doowebsite');
Doo::logger()->rotateFile(102400);
Doo::logger()->writeLogs('framework/' . date('Ym') . '/' . date('d') . '.log', false);
开发者ID:aising,项目名称:ding,代码行数:30,代码来源:index.php

示例5: get_spincard

 function get_spincard($fld = '', $whered = '', $startd = '', $limitd = '')
 {
     $cache_name = "get_spincard_{$fld}_{$whered}_{$startd}_{$limitd}";
     $rs = false;
     $where = '';
     $fields = "*";
     $limit = '';
     $order = '';
     $start = 0;
     if ($startd) {
         $start = $startd;
     }
     if ($fld) {
         $fields = $fld;
     }
     if ($whered) {
         $where = " WHERE {$whered} ";
     }
     if ($limitd) {
         $limit = " LIMIT {$start},{$limitd} ";
     }
     $query = "SELECT SQL_CALC_FOUND_ROWS {$fields} FROM ott_spincard_used  {$where} GROUP BY spincard ORDER BY created desc {$limit} ";
     /* echo $query; */
     try {
         //$rs = $this->cache->get($cache_name);
         //if(!$rs || $this->clearcache){
         $rs = $this->dbAAA2()->fetchAll($query);
         //	$this->cache->set($cache_name,$rs,$this->cache_time);
         //}
     } catch (Exception $e) {
         Doo::logger()->alert($e);
         Doo::logger()->writeLogs("log" + date('Y-m-d') + ".txt", false);
     }
     return $rs;
 }
开发者ID:berlianaputri,项目名称:rps,代码行数:35,代码来源:User.php

示例6: orderPrintPaySUCCESS

    private function orderPrintPaySUCCESS($orderid = 0)
    {
        // $params['orderid'] = '12413237022015092911210327222';
        $params['orderid'] = $orderid;
        $params['pagesize'] = $this->getCurPage() . ',' . Doo::conf()->pagesize;
        //验证此订单是本人的,店长打印则跳开
        if ($this->shopMaster() == false) {
            $params['uid'] = $_SESSION['uid'];
        }
        if (!isset($params['orderid']) || trim($params['orderid']) == '') {
            $this->alert('data null2');
            exit;
        }
        $order = DBproxy::getProcedure('Manage')->setDimension(2)->getOrder($params);
        if ($order['total'] < '1') {
            $this->alert('data null2');
            exit;
        }
        //打印处理
        if ($order['data'][$params['orderid']]['0']['printStatus'] > 0 && $this->shopMaster() == false) {
            $this->alert('已经打印过了');
            exit;
        }
        //订单的状态是否能打印,在微信接口验证
        $orderStatus = $this->queryOrder($params['orderid'], $order['data'][$params['orderid']][0]['status']);
        if ($orderStatus != 'SUCCESS') {
            $this->alert('未支付成功,order status err ');
            exit;
        }
        //D($order['data'][$params['orderid']]);
        foreach ($order['data'][$params['orderid']] as $key => $value) {
            $title[] = $value['title'] . '   ' . $value['wxprice'] . '   (' . $value['sum'] . ')';
        }
        $msgNo = time() + rand(1, 9999);
        /*
         自由格式的打印内容
        */
        if ($order['data'][$params['orderid']]['0']['waimai'] == '1') {
            $waimai = '外卖单 ';
            $sb = '  ******';
            $addr = "\r\n" . '送货地址:' . $order['data'][$params['orderid']]['0']['addr'] . "\r\n";
        } else {
            $waimai = '堂食单';
            $addr = '';
            $sb = '';
        }
        $freeMessage = array('memberCode' => MEMBER_CODE, 'msgDetail' => '
微微乐餐饮欢迎您订购
' . $waimai . ': 序号:' . $order['data'][$params['orderid']]['0']['oid'] . $sb . '

条目   单价(元)   数量
-----------------
' . implode("\r\n", $title) . '

-----------------
合计:' . $order['data'][$params['orderid']]['0']['allPrice'] . '元 

店名:' . $order['data'][$params['orderid']]['0']['shopname'] . $addr . '
联系电话:' . $order['data'][$params['orderid']]['0']['phone'] . '
订购时间:' . date('Y-m-d H:i:s', $order['data'][$params['orderid']]['0']['addtime']) . '
', 'deviceNo' => DEVICE_NO, 'msgNo' => $msgNo);
        $order = DBproxy::getProcedure('Manage')->setDimension(2)->upOrderPrint($order['data'][$params['orderid']]['0']['oid']);
        $printStatus = $this->sendFreeMessage($freeMessage);
        Doo::logger()->info('time:' . date("Y-m-d H:i:s", time()) . "\tip:" . getIP() . "\tprintStatus:" . $printStatus, 'print');
        if ($printStatus == 0) {
            echo '打印请求/任务中队列中,等待打印';
            $order = DBproxy::getProcedure('Manage')->setDimension(2)->upOrderPrint($order['data'][$params['orderid']]['0']['oid']);
        } elseif ($printStatus == 1) {
            echo '打印任务已完成/请求数据已打印';
            $order = DBproxy::getProcedure('Manage')->setDimension(2)->upOrderPrint($order['data'][$params['orderid']]['0']['oid']);
        } elseif ($printStatus == 2) {
            echo '打印任务/请求失败';
        } else {
            echo $printStatus;
        }
        return $msgNo;
    }
开发者ID:aising,项目名称:ding,代码行数:77,代码来源:HomeController.php

示例7: afterRun

 /**
  * 后置控制器
  * @param  [type] $routeResult [description]
  * @return [type]              [description]
  */
 public function afterRun($routeResult)
 {
     parent::afterRun($routeResult);
     switch ($this->_action) {
         case 'add':
         case 'del':
         case 'mod':
             Doo::logger()->info(' ip:' . getIP() . ' user:' . $this->_opname, $this->_action);
             break;
         default:
             Doo::logger()->info(' ip:' . getIP() . ' user:' . $this->_opname);
             break;
     }
 }
开发者ID:aising,项目名称:ding,代码行数:19,代码来源:ApplicationController.php

示例8: destroy

 public function destroy()
 {
     try {
         //init model
         Doo::db()->beginTransaction();
         $m = new $this->model();
         //set id
         $m->id = $this->params['id'];
         //delete
         $m->delete();
         //commit
         Doo::db()->commit();
         $this->res->success = true;
         $this->res->data = $id;
     } catch (Exception $e) {
         Doo::db()->rollBack();
         $this->res->success = false;
         $this->res->message .= "Unable to Delete! ";
         $this->res->data = mySQLExceptions::parse($e->getMessage());
         Doo::logger()->err("DB Delete Error! " . $e->getMessage(), 'db');
     }
 }
开发者ID:garv347,项目名称:swanhart-tools,代码行数:22,代码来源:DBRESTController.php

示例9:

<?php

require_once 'version.php';
include './protected/config/common.conf.php';
include './protected/config/routes.conf.php';
include './protected/config/db.conf.php';
#Just include this for production mode
//include $config['BASE_PATH'].'deployment/deploy.php';
include $config['BASE_PATH'] . 'Doo.php';
include $config['BASE_PATH'] . 'app/DooConfig.php';
# Uncomment for auto loading the framework classes.
//spl_autoload_register('Doo::autoload');
//var_dump($config); exit;
Doo::conf()->set($config);
# remove this if you wish to see the normal PHP error view.
//include $config['BASE_PATH'].'diagnostic/debug.php';
# database usage
//Doo::useDbReplicate();	#for db replication master-slave usage
//Doo::db()->setMap($dbmap);
Doo::db()->setDb($dbconfig, $config['APP_MODE']);
Doo::db()->sql_tracking = true;
#for debugging/profiling purpose
Doo::app()->route = $route;
# Uncomment for DB profiling
Doo::logger()->beginDbProfile('doowebsite');
Doo::app()->run();
Doo::logger()->endDbProfile('doowebsite');
Doo::logger()->rotateFile(20);
echo Doo::logger()->writeDbProfiles();
//Doo::logger()->trace('message...');
//echo Doo::logger()->showLogs();
开发者ID:berlianaputri,项目名称:rps,代码行数:31,代码来源:index.php


注:本文中的Doo::logger方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。