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


PHP JLog::addLogger方法代码示例

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


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

示例1: sendOrderInformations

 /**
  * Sends the tracking information to mailchimp if we have the tracking ids
  * Logs errors
  * @param $store_id
  * @param string $store_name
  * @param int $order_id
  * @param int $total_amount
  * @param int $tax_amount
  * @param int $shipping_amount
  * @param array $products
  * @return bool
  */
 public static function sendOrderInformations($store_id, $store_name = "Store name", $order_id = 0, $total_amount = 0, $tax_amount = 0, $shipping_amount = 0, $products = array(0 => array("product_id" => 0, "sku" => "", "product_name" => "", "category_id" => 0, "category_name" => "", "qty" => 1.0, "cost" => 0.0)))
 {
     // log the errors to a file
     JLog::addLogger(array('text_file' => 'com_cmc_ecom360.php'));
     $session = JFactory::getSession();
     $mc_cid = $session->get('mc_cid', '');
     $mc_eid = $session->get('mc_eid', '');
     if (!$mc_cid && !$mc_eid) {
         JLog::add('No cid and eid specified for the request', JLOG::ERROR);
         return false;
     }
     $order = array();
     $order["id"] = $order_id;
     $order["email_id"] = $mc_eid;
     $order["total"] = (double) $total_amount;
     $order["shipping"] = (double) $shipping_amount;
     $order["tax"] = (double) $tax_amount;
     $order["store_id"] = $store_id;
     $order["store_name"] = $store_name;
     $order["campaign_id"] = $mc_cid;
     // Optional
     $order["items"] = $products;
     $api = new cmcHelperChimp();
     $api->ecommOrderAdd($order);
     if ($api->errorCode) {
         JLog::add($api->errorMessage, JLOG::ERROR, $api->errorCode);
         return false;
     }
     return true;
 }
开发者ID:fracting,项目名称:cmc,代码行数:42,代码来源:ecom360.php

示例2: __construct

 function __construct()
 {
     // Include the JLog class.
     jimport('joomla.log.log');
     // Add the logger.
     JLog::addLogger(array('logger' => 'database'));
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:7,代码来源:ipn.php

示例3: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     if (JDEBUG) {
         JLog::addLogger(array('text_file' => 'com_usernotes.log.php'), JLog::ALL, array('com_usernotes'));
     }
 }
开发者ID:ron4mac,项目名称:joomla_com_usernotes,代码行数:7,代码来源:edit.php

示例4: __construct

 public function __construct()
 {
     JLog::addLogger(array('text_file' => "jotcache.recache.log.php", 'text_entry_format' => "{DATE} {TIME}\t{MESSAGE}", 'text_file_path' => JPATH_ROOT . '/logs'), JLog::INFO, 'jotcache.recache');
     $this->dbo = JFactory::getDBO();
     $this->recacheParams = JComponentHelper::getParams('com_jotcache');
     $this->logging = $this->recacheParams->get('recachelog', 0) == 1 ? true : false;
 }
开发者ID:naka211,项目名称:myloyal,代码行数:7,代码来源:recacherunner.php

示例5: onLogInitialise

 /**
  * Fired on log initialiser.
  *
  * @return  void
  *
  * @since   2.0
  */
 public function onLogInitialise()
 {
     // This is the columns that the log files will use
     $fileFormat = str_replace('\\t', "\t", $this->params->get('file_format', '{DATETIME}\\t{ID}\\t{MESSAGE}'));
     /*
      * Deals with the Information level logs.
      */
     if ($this->params->get('enable_info', true)) {
         // Setup a information file logger
         JLog::addLogger(array('logger' => self::LOGGER_FILE, 'text_file' => $this->params->get('log_name_info', 'sso.info.php'), 'text_entry_format' => $fileFormat), JLog::INFO, array(self::SSO_CATEGORY, self::AUTH_CATEGORY));
     }
     /*
      * Deals with the Debugging level logs (which includes all levels internally).
      */
     if ($this->params->get('enable_debug', true)) {
         // Setup a debugger file logger
         JLog::addLogger(array('logger' => self::LOGGER_FILE, 'text_file' => $this->params->get('log_name_debug', 'sso.debug.php'), 'text_entry_format' => $fileFormat), JLog::ALL, array(self::SSO_CATEGORY, self::AUTH_CATEGORY));
     }
     /*
      * Deals with the Error level logs.
      */
     if ($this->params->get('enable_error', true)) {
         // Setup a error file logger
         JLog::addLogger(array('logger' => self::LOGGER_FILE, 'text_file' => $this->params->get('log_name_error', 'sso.error.php'), 'text_entry_format' => $fileFormat), JLog::ERROR, array(self::SSO_CATEGORY, self::AUTH_CATEGORY));
         if ($this->params->get('error_to_screen', true)) {
             // Setup a error on-screen logger
             JLog::addLogger(array('logger' => self::LOGGER_SCREEN), JLog::ERROR, array(self::SSO_CATEGORY, self::AUTH_CATEGORY));
         }
     }
 }
开发者ID:philbertphotos,项目名称:JMapMyLDAP,代码行数:37,代码来源:sso.php

示例6: __construct

 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->loadLanguage();
     $lang = JFactory::getLanguage();
     $lang->load('plg_djclassifiedspayment_djcf2co', JPATH_ROOT . DS . 'plugins' . DS . 'djclassifiedspayment' . DS . 'djcf2co', 'en-GB', false, false);
     $lang->load('plg_djclassifiedspayment_djcf2co', JPATH_ADMINISTRATOR, 'en-GB', false, false);
     $lang->load('plg_djclassifiedspayment_djcf2co', JPATH_ROOT . DS . 'plugins' . DS . 'djclassifiedspayment' . DS . 'djcf2co', null, true, false);
     $lang->load('plg_djclassifiedspayment_djcf2co', JPATH_ADMINISTRATOR, null, true, false);
     $params["plugin_name"] = "djcf2co";
     $params["icon"] = "2checkout-logo.png";
     $params["logo"] = "2checkout-logo.png";
     $params["description"] = JText::_("PLG_DJCLASSIFIEDSPAYMENT_DJCF2CO_PAYMENT_METHOD_DESC");
     $params["payment_method"] = JText::_("PLG_DJCLASSIFIEDSPAYMENT_DJCF2CO_PAYMENT_METHOD_NAME");
     $params["testmode"] = $this->params->get("test", "1");
     $params["currency_code"] = $this->params->get("currency_code", "USD");
     $params["sid"] = $this->params->get("sid", null);
     $params["secret_word"] = $this->params->get("secret_word", null);
     $params["2co_url"] = 'https://www.2checkout.com/checkout/purchase';
     $params["debug"] = $this->params->get('debug', null);
     if ($this->params->get('debug', null) == '1') {
         JLog::addLogger(array('logger' => 'formattedtext', 'text_file' => 'djcf2co.log.php'), JLog::ALL, array('djcf2co'));
     }
     $this->params = $params;
 }
开发者ID:kidaa30,项目名称:lojinha,代码行数:25,代码来源:djcf2co.php

示例7: __construct

 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->loadLanguage();
     $lang = JFactory::getLanguage();
     $lang->load('plg_djclassifiedspayment_djcfSkrill', JPATH_ROOT . DS . 'plugins' . DS . 'djclassifiedspayment' . DS . 'djcfSkrill', 'en-GB', false, false);
     $lang->load('plg_djclassifiedspayment_djcfSkrill', JPATH_ADMINISTRATOR, 'en-GB', false, false);
     $lang->load('plg_djclassifiedspayment_djcfSkrill', JPATH_ROOT . DS . 'plugins' . DS . 'djclassifiedspayment' . DS . 'djcfSkrill', null, true, false);
     $lang->load('plg_djclassifiedspayment_djcfSkrill', JPATH_ADMINISTRATOR, null, true, false);
     $params["plugin_name"] = "djcfskrill";
     $params["icon"] = "skrill_logo.png";
     $params["logo"] = "skrill_logo.png";
     $params["description"] = JText::_("PLG_DJCLASSIFIEDSPAYMENT_DJCFSKRILL_PAYMENT_METHOD_DESC");
     $params["payment_method"] = JText::_("PLG_DJCLASSIFIEDSPAYMENT_DJCFSKRILL_PAYMENT_METHOD_NAME");
     //$params["testmode"] = $this->params->get("test", "1");
     $params["currency_code"] = $this->params->get("currency_code", "USD");
     $params["merchant_id"] = $this->params->get("merchant_id", null);
     $params["pay_to_email"] = $this->params->get("pay_to_email", null);
     $params["secret_word"] = $this->params->get("secret_word", null);
     $params["skrill_url"] = 'https://www.moneybookers.com/app/payment.pl';
     $params["skrill_test_url"] = 'https://www.moneybookers.com/app/test_payment.pl';
     $params["debug"] = $this->params->get('debug', null);
     $params["languages"] = array('EN', 'DE', 'ES', 'FR', 'IT', 'PL', 'GR', 'RO', 'RU', 'TR', 'CN', 'CZ', 'NL', 'DA', 'SV', 'FI');
     if ($this->params->get('debug', null) == '1') {
         JLog::addLogger(array('logger' => 'formattedtext', 'text_file' => 'djcfskrill.log.php'), JLog::ALL, array('djcfskrill'));
     }
     $this->params = $params;
 }
开发者ID:kidaa30,项目名称:lojinha,代码行数:28,代码来源:djcfskrill.php

示例8: startJoomlaDbErrorLogger

 /**
  * Set db logger. Since all JErrors E_ERROR will be added to log.
  * Usefull if you render something J! native. 
  * Covers all E_ERROR generated by 
  * JError::raiseError, JError::raise, JError::throwError.
  * 
  * All execs of JLog::add(...) with 
  * JLog::EMERGENCY | JLog::ALERT | JLog::CRITICAL | JLog::ERROR
  * will be added to LOGS table.
  */
 public static function startJoomlaDbErrorLogger()
 {
     // Add handler to JError for E_ERROR
     JError::setErrorHandling(E_ERROR, 'callback', array('LogHelper', 'addJError'));
     // Now we log all the troubles into our LOGS table.
     JLog::addLogger(array('logger' => 'database', 'db_table' => '#__newsletter_logs'), JLog::EMERGENCY | JLog::ALERT | JLog::CRITICAL | JLog::ERROR);
 }
开发者ID:Rikisha,项目名称:proj,代码行数:17,代码来源:log.php

示例9: getPicasawebResult

 /**
  * returns the name of the file for this url.
  */
 public static function getPicasawebResult($url)
 {
     $params = JComponentHelper::getParams('com_eventgallery');
     $cachelifetime = $params->get('cache_picasa_lifetime', self::$cache_life);
     JLog::addLogger(array('text_file' => 'com_eventgallery.log.php', 'logger' => 'Eventgalleryformattedtext'), JLog::ALL, 'com_eventgallery');
     //JLog::add('processing url '.$url, JLog::INFO, 'com_eventgallery');
     self::initCacheDirs();
     $cachefilename = self::$cachebasedir . md5($url) . '.xml';
     if (file_exists($cachefilename) && time() - filemtime($cachefilename) <= $cachelifetime) {
         // no need to do anything since the cache is still valid
     } else {
         //JLog::add('have writen new cache file for '.$url, JLog::INFO, 'com_eventgallery');
         $xml = @file_get_contents($url);
         if ($xml === false) {
             JLog::add('unable to connect to remote host. Make sure allow_url_fopen=On and the server has access to the internet. url: ' . $url, JLog::INFO, 'com_eventgallery');
         }
         $xml = str_replace("xmlns='http://www.w3.org/2005/Atom'", '', $xml);
         #echo "reloading content from $url <br>";
         if (strlen($xml) > 0) {
             $fh = fopen($cachefilename, 'w') or die("can't open file {$cachefilename}");
             fwrite($fh, $xml);
             fclose($fh);
         }
     }
     $xml = NULL;
     return $cachefilename;
 }
开发者ID:sansandeep143,项目名称:av,代码行数:30,代码来源:helper.php

示例10: __construct

 /**
  * Constructor.
  *
  * @param   object  &$subject  The object to observe
  * @param   array   $config    An array that holds the plugin configuration
  *
  * @since 1.5
  */
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     // Log the deprecated API.
     if ($this->params->get('log-deprecated')) {
         \JLog::addLogger(array('text_file' => 'deprecated.php'), \JLog::ALL, array('deprecated'));
     }
     // Log database errors
     if ($this->params->get('log-database-errors')) {
         \JLog::addLogger(array('text_file' => 'jdatabase.error.php'), \JLog::ALL, array('database'));
     }
     // Log database queries
     if ($this->params->get('log-database-queries')) {
         \JLog::addLogger(array('text_file' => 'jdatabase.query.php'), \JLog::ALL, array('databasequery'));
         // Register the HUBzero database logger as well
         // Don't worry, this won't log things twice...queries through joomla's database driver
         // will get logged above, and this will catch queries through hubzero's database driver
         \Event::listen(function ($event) {
             \Hubzero\Database\Log::add($event->getArgument('query'), $event->getArgument('time'));
         }, 'database_query');
     }
     // Only if debugging or language debug is enabled
     if (Config::get('debug') || Config::get('debug_lang')) {
         Config::set('gzip', 0);
         ob_start();
         ob_implicit_flush(false);
     }
     $this->linkFormat = ini_get('xdebug.file_link_format');
 }
开发者ID:zooley,项目名称:hubzero-cms,代码行数:37,代码来源:debug.php

示例11: __construct

 /**
  * Construct
  */
 public function __construct()
 {
     // Include the JLog class.
     jimport('joomla.log.log');
     // Add the logger.
     JLog::addLogger(array('text_file' => 'fabrik.subs.log.php'));
 }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:10,代码来源:ipn.php

示例12: __construct

 /**
  * Constructor.
  *
  * @param   object  &$subject  The object to observe
  * @param   array   $config    An array that holds the plugin configuration
  *
  * @since 1.5
  */
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     // Log the deprecated API.
     if ($this->params->get('log-deprecated')) {
         JLog::addLogger(array('text_file' => 'deprecated.php'), JLog::ALL, array('deprecated'));
     }
     $this->debugLang = JFactory::getApplication()->getCfg('debug_lang');
     // Only if debugging or language debug is enabled
     if (JDEBUG || $this->debugLang) {
         JFactory::getConfig()->set('gzip', 0);
         ob_start();
         ob_implicit_flush(false);
     }
     $this->linkFormat = ini_get('xdebug.file_link_format');
     if ($this->params->get('logs', 1)) {
         $priority = 0;
         foreach ($this->params->get('log_priorities', array()) as $p) {
             $const = 'JLog::' . strtoupper($p);
             if (!defined($const)) {
                 continue;
             }
             $priority |= constant($const);
         }
         // Split into an array at any character other than alphabet, numbers, _, ., or -
         $categories = array_filter(preg_split('/[^A-Z0-9_\\.-]/i', $this->params->get('log_categories', '')));
         $mode = $this->params->get('log_category_mode', 0);
         JLog::addLogger(array('logger' => 'callback', 'callback' => array($this, 'logger')), $priority, $categories, $mode);
     }
 }
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:38,代码来源:debug.php

示例13: display

 function display($tpl = null)
 {
     /*
     // load component parameters
     $params = JComponentHelper::getParams( 'com_chessvn' );
     $params = $app->getParams( 'com_chessvn' );	
     $dummy = $params->get( 'dummy_param', 1 ); 
     
     // load another model
     JModelLegacy::addIncludePath(JPATH_SITE.'/components/com_chessvn/models');
     $otherModel = JModelLegacy::getInstance( 'Record', 'RecordModel' );
     */
     $data = $this->get('Data');
     $this->assignRef('data', $data);
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JLog::add(implode('<br />', $errors), JLog::WARNING, 'jerror');
         return false;
     }
     $userid = JRequest::getVar('userid');
     $this->assignRef('userid', $userid);
     $gameid = JRequest::getVar('gameid');
     $this->assignRef('gameid', $gameid);
     jimport('joomla.log.log');
     JLog::addLogger(array());
     //        JLog::add(JText::_('$userid = '.$userid), JLog::INFO);
     //        $cvnuser = JFactory::getUser();
     //        $returnData = CvnDao::getChallenges();//$cvnuser->get('id')
     parent::display($tpl);
 }
开发者ID:khangcodt,项目名称:nvssehcweb,代码行数:30,代码来源:view.xml.php

示例14: __construct

 public function __construct($options = array())
 {
     $this->debug = intval(JFBCFactory::config()->get('facebook_display_errors'));
     $this->text_file = isset($options['text_file']) ? $options['text_file'] : $this->text_file;
     if ($this->debug) {
         JLog::addLogger(array('text_file' => $this->text_file), JLog::ALL, 'jfbconnect');
     }
 }
开发者ID:q0821,项目名称:esportshop,代码行数:8,代码来源:debug.php

示例15: Storelog

 public static function Storelog($name, $logdata)
 {
     jimport('joomla.error.log');
     $options = array('format' => "{DATE}\t{TIME}\t{USER}\t{DESC}");
     $path = JPATH_SITE . '/plugins/digicom-pay/' . $name . '/' . $name . '/';
     $my = JFactory::getUser();
     JLog::addLogger(array('user' => $my->name . '(' . $my->id . ')', 'desc' => json_encode($logdata['raw_data'])));
 }
开发者ID:Shtier,项目名称:digicom,代码行数:8,代码来源:helper.php


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