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


PHP Mage::Log方法代码示例

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


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

示例1: Log

 public function Log($message, $level = Zend_Log::DEBUG)
 {
     if ($this->isDebug() || $level < 5) {
         // log only if debug is enabled or is a warn or below error
         Mage::Log($message, $level, 'paymentech-log.log');
     }
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:7,代码来源:Gorilla_Paymentech_Helper_Data.php

示例2: exportProducts

 public function exportProducts($observer)
 {
     Mage::Log("exportProducts called!");
     echo "VPS Export Products called!";
     exit;
     //Mage::log($observer->getEvent()->getControllerAction()->getFullActionName());
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:7,代码来源:Observer.php

示例3: addContainerBlock

 public function addContainerBlock($observer)
 {
     #Mage::Log($_SERVER['SCRIPT_URI']);
     #Mage::Log("Start addContainerBlocks");
     $layout = Mage::getSingleton('core/layout');
     if (!$layout) {
         Mage::Log("No Layout Object in " . __METHOD__);
         return;
     }
     $before_body_end = $layout->getBlock('before_body_end');
     if (!$before_body_end) {
         Mage::Log("No before body end in " . __METHOD__);
         return;
     }
     if (!Mage::helper('segment_analytics')->isEnabled()) {
         return;
     }
     $container = $layout->createBlock('core/text_list', self::CONTAINER_BLOCKNAME);
     $before_body_end->append($container);
     $front = Segment_Analytics_Model_Front_Controller::getInstance();
     $blocks = $front->getBlocks();
     foreach ($blocks as $block) {
         if (!$block) {
             continue;
         }
         $items = $block = is_array($block) ? $block : array($block);
         foreach ($items as $block) {
             $container->append($block);
         }
     }
     #Mage::Log("Finished addContainerBlocks");
 }
开发者ID:benmccormick,项目名称:analytics-magento,代码行数:32,代码来源:Observer.php

示例4: format

 public function format($thing)
 {
     $helper = $this->getShim()->helper('commercebug/formatlog_allsimple');
     if ($helper) {
         return $helper->format($thing);
     }
     Mage::Log(sprintf('Could not instantiate helper class: %s', $alias));
 }
开发者ID:CE-Webmaster,项目名称:CE-Hub,代码行数:8,代码来源:Log.php

示例5: Log

 public function Log($message, $logname = "greatplains", $level = Zend_Log::DEBUG)
 {
     if ($this->isDebug() || $level < 5) {
         // log only if debug is enabled or
         // is a warn or below error
         Mage::Log(date("m-d-y G:i:s :: ", time()) . " : " . $message, $level, 'greatplains.' . $logname . '.log');
         //  echo date ( "m-d-y G:i:s :: ", time () ) ." : ".$message."\n";;
     }
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:9,代码来源:Gorilla_Greatplains_Helper_Data.php

示例6: format

 public function format($thing)
 {
     $helper = Mage::helper('commercebug/formatlog_allsimple');
     if ($helper) {
         return $helper->format($thing);
     }
     Mage::Log(sprintf('Could not instantiate helper class: %s', $alias));
     //return;
     #return __CLASS__ . 'Serialized:' . $thing;
 }
开发者ID:praxigento,项目名称:mage_app_prxgt_store,代码行数:10,代码来源:Log.php

示例7: debug

 /**
  * If object is in debug mode it returns all debug notifications to standard output
  * @param string $data
  */
 protected function debug()
 {
     if ($this->debugFlag === true) {
         $arg_list = func_get_args();
         foreach ($arg_list as $v) {
             Mage::Log('[Sheepla][' . date('Y-m-d H:i:s') . ']' . print_r($v, true));
             if ($this->forceDebugFlag) {
                 echo date('Y-m-d H:i:s') . ' : <pre>' . htmlentities(print_r($v, true)) . "</pre> <br />\n\r";
             }
         }
     }
 }
开发者ID:xiaoguizhidao,项目名称:ortodon,代码行数:16,代码来源:magento_sheepla_proxy.class.php

示例8: format

 public function format($thing)
 {
     $alias = Mage::getStoreConfig('commercebug/options/log_format_class');
     if ($alias == 'custom') {
         $alias = Mage::getStoreConfig('commercebug/options/log_format_class_custom');
     }
     $helper = Mage::helper($alias);
     if ($helper) {
         return $helper->format($thing);
     }
     Mage::Log(sprintf('Could not instantiate helper class: %s', $alias));
     return $thing;
     #return __CLASS__ . 'Serialized:' . $thing;
 }
开发者ID:rubenjohne,项目名称:ts-echo,代码行数:14,代码来源:Log.php

示例9: getRequestedProductData

 /**
  * Get Product information from qquote_request_item table
  * @return object
  */
 public function getRequestedProductData($id, $quoteId)
 {
     $prices = array();
     $aQty = array();
     $quote = Mage::getModel('qquoteadv/qqadvcustomer')->load($quoteId);
     $collection = Mage::getModel('qquoteadv/requestitem')->getCollection()->setQuote($quote)->addFieldToFilter('quote_id', $quoteId)->addFieldToFilter('quoteadv_product_id', $id);
     $collection->getSelect()->order('request_qty asc');
     $n = count($collection);
     if ($n > 0) {
         foreach ($collection as $requested_item) {
             $aQty[] = $requested_item->getRequestQty();
             $prices[] = $requested_item->getOwnerCurPrice();
             Mage::Log("CURPRICE" . $requested_item->getOwnerCurPrice());
         }
     }
     return $return = array('ownerPrices' => $prices, 'aQty' => $aQty);
 }
开发者ID:cnglobal-sl,项目名称:caterez,代码行数:21,代码来源:Item.php

示例10: getHelpers

 public function getHelpers($module)
 {
     try {
         $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($module . '/Helper'));
     } catch (UnexpectedValueException $e) {
         Mage::Log($e->getMessage());
         return '';
     }
     $options = array();
     while ($it->valid()) {
         if (!$it->isDot()) {
             $label = strtolower(str_replace('.php', '', str_replace('/', '_', $it->getSubPathName())));
             $options[$it->key() . '=>' . $label] = $label;
         }
         $it->next();
     }
     return $this->_toOptionsFromHash($options);
 }
开发者ID:itmyprofession,项目名称:Pulsestorm,代码行数:18,代码来源:Helper.php

示例11: _createCustomerAddress

 private function _createCustomerAddress($customer)
 {
     Mage::Log("Year :::  " . $customer->getYear());
     //Validate and fill default values.
     $year = $customer->getYear() ? $customer->getYear() : "9999";
     $course = $customer->getCourse() ? $customer->getCourse() : "NA";
     $college = $customer->getCollege() ? $customer->getCollege() : "NA";
     $place = $customer->getPlace() ? $customer->getPlace() : "NA";
     $phone = $customer->getPhone() ? $customer->getPhone() : "9999999999";
     $_custom_address = array('firstname' => $customer->getFirstname(), 'lastname' => $customer->getLastname(), 'street' => array('0' => $year . ", " . $course, '1' => $college), 'city' => $place, 'region_id' => '', 'region' => '', 'postcode' => '0', 'country_id' => 'IND', 'telephone' => $phone);
     $customAddress = Mage::getModel('customer/address');
     $customAddress->setData($_custom_address)->setCustomerId($customer->getId())->setIsDefaultBilling('1')->setIsDefaultShipping('1')->setSaveInAddressBook('1');
     try {
         $customAddress->save();
         Mage::Log("Adding information success!!!");
     } catch (Exception $ex) {
         //Zend_Debug::dump($ex->getMessage());
         Mage::Log("Error in Address " . $ex->getMessage());
     }
     return;
 }
开发者ID:prabudiss,项目名称:knovid_v2,代码行数:21,代码来源:FbloginController.php

示例12: Process

 public function Process($data)
 {
     $d = $data->CreateNewOrderResult;
     if (stristr($d, "Error occured Creating Order")) {
         $a = explode("Node Identifier Par", $d);
         $d = $a[0];
         $d = explode("Error Description = ", $d);
         $error = $d[1];
         $error = $a[0];
         Mage::Log($error, 1, "gp_new_order_error.log");
         Mage::Log(print_r($d, true), 1, "gp_new_order_error.log");
         $this->_errors = $error;
         return $this;
     }
     if (isset($data->return)) {
         $this->_errors = $data->return->error;
         return $this;
     }
     $this->_return[] = $data;
     return $this;
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:21,代码来源:Gorilla_Greatplains_Model_Source_CreateNewOrder.php

示例13: _getProductCollection

 protected function _getProductCollection()
 {
     // trying to override this method
     if (is_null($this->_x_productCollection)) {
         $collection = parent::_getProductCollection();
         $session = Mage::getSingleton('customer/session');
         $isCorporate = FALSE;
         if ($session->isLoggedIn()) {
             $customer = $session->getCustomer();
             $isCorporate = $customer->getZiscorporate();
         }
         if ($isCorporate == 470) {
             $collection->addTierPriceData();
             $collection->addAttributeToFilter('tier_price', 'notnull');
             // $collection->getSelect()->where("price_index.tier_price IS NOT NULL");
             Mage::Log("Rrap_Corporate_Block_Product_List select is " . $collection->getSelect());
         }
         $this->_productCollection = $collection;
     } else {
         $collection = parent::_getProductCollection();
     }
     return $collection;
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:23,代码来源:List.php

示例14: paymentcallbackAction

 public function paymentcallbackAction()
 {
     $data = $this->getRequest()->getPost();
     Mage::Log($data);
     if ($data['order_id'] && $data['appkey'] && $data['order_uid'] && $data['amount'] && $data['sign']) {
         $app_key = Mage::getStoreConfig('sns/sns_weibo/app_key');
         $debug = Mage::getStoreConfig('sns/sns_weibo/debug');
         $app_secret = Mage::getStoreConfig('sns/sns_weibo/app_secret');
         if ($app_key == $data['appkey']) {
             $signkey = md5($data['order_id'] . "|" . $data['appkey'] . "|" . $data['order_uid'] . "|" . $data['amount'] . "|" . $app_secret);
             if ($signkey == $data['sign']) {
                 echo $return = 'OK';
             } else {
                 echo $return = 'NOTVALIDSIGN';
             }
         } else {
             echo $return = 'NOTVALIDKEY';
         }
     } else {
         echo $return = 'EMPTYPOST';
     }
     Mage::Log($return);
     exit;
 }
开发者ID:patrickouc,项目名称:magento-social-login,代码行数:24,代码来源:WeiboController.php

示例15: __call

 public function __call($method, $params)
 {
     Mage::log("_call");
     //Mage::log($method);
     //Mage::log($params);
     //die;
     foreach ($params as $k => $v) {
         Mage::log("-------------------------afasdfagfagfr------------------------");
         Mage::Log("k is : {$k}");
         $data = $this->generateValidXmlFromObj($v);
         Mage::Log($data);
         //	if(is_object($v))
         //		Mage::Log("v is object ".print_r($v,true));
         //		else
         //	Mage::Log("v is string ".$v);
         if ($v === null) {
             Mage::Log("SPOTTED A NULL YO!!!");
             $this->mustParseNulls = true;
             $params[$k] = self::_NULL_;
         }
     }
     //die;
     return parent::__call($method, $data);
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:24,代码来源:Gorilla_Greatplains_Model_XSoapClient.php


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