本文整理汇总了PHP中Debug::log方法的典型用法代码示例。如果您正苦于以下问题:PHP Debug::log方法的具体用法?PHP Debug::log怎么用?PHP Debug::log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debug
的用法示例。
在下文中一共展示了Debug::log方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: flagAsPaid
public function flagAsPaid($itemExpenseId)
{
Debug::log('Flagging as paid...');
$data = array('isFullyPaid' => 1);
$this->db->update('ItemExpense', $data, array('itemExpenseId' => $itemExpenseId));
Debug::log($this->db->last_query());
}
示例2: execute
public function execute($arrParams = null)
{
// echo 'EXECUTING <Pre>';
// print_r($this);
// print_r($arrParams);
// echo '</pre>';
// echo '<pre>';
// print_r( debug_backtrace()) ;
// echo '</pre>';
$start = $this->microtime_float();
$objRes = $this->statement->execute($arrParams);
$time = $this->microtime_float() - $start;
if (!in_array($this->statement->queryString, self::$arrAlreadyLogged)) {
$strClass = 'unknown';
$strMethod = 'unknown';
$arrDebug = debug_backtrace();
if (!empty($arrDebug[1])) {
$strClass = $arrDebug[1]['class'];
$strMethod = $arrDebug[1]['function'];
}
unset($arrDebug);
$strDebugString = sprintf("%s \n\tfrom %s::%s() \n\ttime: <span style='color:red;'>%s s.</span>\n", $this->statement->queryString, $strClass, $strMethod, $time);
Debug::log($strDebugString, 'db-stmt-execute');
self::$arrAlreadyLogged[] = $this->statement->queryString;
}
return $objRes;
}
示例3: __construct
function __construct()
{
Debug::log("Running", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
self::$debug = new Debug();
self::$benchmark = new Benchmark();
self::$benchmark->mark("Run/Inicio");
$this->startBasicConfig();
self::$control = new Control();
self::$model = new Model();
self::$view = new View();
self::$session = new Session();
self::$cookie = new Cookie();
self::$properties = new Properties();
self::$language = new Language();
self::$json = new FastJSON();
self::$ajaxMethod = new AjaxMethod();
self::$action = new Action();
self::$benchmark->writeMark("Run/Inicio", "Run/Classes Instanciadas");
//é 0.003 mais rápido carregar td de uma vez
//$this->startExtrasClasses();
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if (Run::USE_ROUTER) {
self::$benchmark->mark("USE_ROUTER/Inicio");
self::$router = new Router();
self::$router->startRouter();
$this->autoExecute();
self::$router->startLoadContent();
self::$benchmark->mark("USE_ROUTER/Final");
} else {
$this->autoExecute();
}
self::$benchmark->writeMark("Run/Inicio", "Run/Final");
}
示例4: __construct
function __construct()
{
Debug::log("Iniciando Core/log/Benchmark.", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
if (isset($_GET['benchmark'])) {
Run::$DEBUG_BENCHMARK = true;
}
}
示例5: __construct
function __construct($settings, $id = 0)
{
Debug::log("Iniciando Core/Form/token.", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
$this->tokenId = $id;
Debug::p("tokenId", $this->tokenId);
$this->settings = $settings;
}
示例6: process
public static function process()
{
// response object is a singleton
$response = self::getResponse();
if ($_POST) {
$todo = Utils::arrayValue('arlClass', $_POST);
self::$request =& $_POST;
} else {
$todo = Utils::arrayValue('arlClass', $_GET);
self::$request =& $_GET;
}
if ($todo == 'keepalive') {
// noop
$response->obj['success'] = 1;
} else {
self::runProcess($todo);
}
Debug::log("!! Response object:", $response);
// if debugging, call fatal()
if (Utils::arrayValue('debug', self::$request)) {
Debug::fatal("Exited as debugging requested");
}
// send response and exit;
$response->send();
}
示例7: assertEqual
public static function assertEqual($expression1, $expression2)
{
Debug::log('ASSERT EQUAL', $expression1 == $expression2);
if ($expression1 != $expression2) {
self::$failsNumber++;
}
}
示例8: cleanData
function cleanData($model)
{
Debug::log("Iniciando Core/Form/cleanData.", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
$this->model = $model;
$this->checkCleanData();
$this->checkRecoverData();
}
示例9: fetchPayablesList
public function fetchPayablesList($showFilter = self::FILTER_ACTIVE, $fromDate = null, $toDate = null, $supplierId = null)
{
$this->db->select('ie.*, s.supplierId, s.name as supplierName, i.itemId, i.description as itemDescription, i.productCode as itemProductCode')->from('ItemExpense ie')->join('Supplier s', 'ie.supplierId=s.supplierId', 'left')->join('Item i', 'i.itemId = ie.itemId')->where('ie.isCredit = 1');
switch ($showFilter) {
case self::FILTER_PAID:
$this->db->where('ie.isFullyPaid = 1');
break;
default:
$this->db->where('ie.isFullyPaid = 0');
break;
}
if (!empty($fromDate) && !empty($toDate)) {
$this->db->where('DATE(ie.dateAdded) >= ', $fromDate);
$this->db->where('DATE(ie.dateAdded) <= ', $toDate);
} elseif (!empty($fromDate) && empty($toDate)) {
$this->db->where('DATE(ie.dateAdded) >= ', $fromDate);
$this->db->where('DATE(ie.dateAdded) <= ', date('Y-m-d'));
} elseif (empty($fromDate) && !empty($toDate)) {
$this->db->where('DATE(ie.dateAdded) <= ', $toDate);
}
if (!empty($supplierId)) {
$this->db->where('ie.supplierId', $supplierId);
}
$query = $this->db->get();
Debug::log($this->db->last_query());
return $query->result_array();
}
示例10: handleError
function handleError($e, $msgForLog)
{
$msg = $e . $msgForLog;
echo $msg;
Debug::log($msg);
die;
}
示例11: insert
public function insert()
{
Debug::log($this);
$this->_checkArgs();
$this->db->insert($this->_name, $this);
return $this->db->insert_id();
}
示例12: __construct
function __construct()
{
//Run::$DEBUG_PRINT = true;
Debug::log("Iniciando Core/Debug.", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
if (isset($_GET['debug-print'])) {
Run::$DEBUG_PRINT = true;
}
}
示例13: fetchTotalSales
public function fetchTotalSales($date)
{
$this->db->select('SUM(totalPrice) as total')->from('SalesTransaction')->where('DATE(transactionDate)', $date);
$query = $this->db->get();
Debug::log($this->db->last_query());
$result = $query->row_array();
return $result['total'];
}
示例14: getTotalExpense
public function getTotalExpense($date)
{
$this->db->select('SUM(price) as total')->from('OtherExpense')->where('DATE(dateAdded)', $date);
$query = $this->db->get();
Debug::log($this->db->last_query());
$result = $query->row_array();
return $result['total'];
}
示例15: fetchLowInStock
function fetchLowInStock()
{
$this->db->select('s.*, sum(quantity) as totalQuantity, i.*')->from('Stock s')->join('Item i', 's.itemId = i.itemId')->group_by('s.itemId')->having('totalQuantity < ' . self::LOW_STOCK_QUANTITY_THRESHOLD);
$query = $this->db->get();
$results = $query->result_array();
Debug::log($this->db->last_query());
Debug::log($results);
return $results;
}