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


PHP Kohana::Log方法代码示例

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


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

示例1: render

 /**
  * Override View_Core::render so that we trap errors stemming from bad PHP includes and show a
  * visible stack trace to help developers.
  *
  * @see View_Core::render
  */
 public function render($print=false, $renderer=false) {
   try {
     return parent::render($print, $renderer);
   } catch (Exception $e) {
     Kohana::Log("error", $e->getMessage() . "\n" . $e->getTraceAsString());
     return "";
   }
 }
开发者ID:kovert,项目名称:gallery3,代码行数:14,代码来源:MY_View.php

示例2: render

 /**
  * Override View_Core::render so that we trap errors stemming from bad PHP includes and show a
  * visible stack trace to help developers.
  *
  * @see View_Core::render
  */
 public function render($print = false, $renderer = false)
 {
     try {
         return parent::render($print, $renderer);
     } catch (Exception $e) {
         if (!IN_PRODUCTION) {
             print $e->getTraceAsString();
             return $e->getMessage();
         }
         Kohana::Log('error', $e->getTraceAsString());
         Kohana::Log('debug', $e->getMessage());
         return "";
     }
 }
开发者ID:Juuro,项目名称:Dreamapp-Website,代码行数:20,代码来源:MY_View.php

示例3: __construct

 /**
  * Sets the config for the class.
  *
  * @param  array  config passed from the library
  */
 public function __construct($config)
 {
     $this->test_mode = $config['test_mode'];
     $this->fields['payment_url'] = $config['payment_url'];
     $this->fields['currency'] = $config['currency'];
     if ($this->test_mode) {
         $this->fields['test_pay_to_email'] = $config['test_pay_to_email'];
         $this->fields['test_password'] = $config['test_password'];
     } else {
         $this->fields['pay_to_email'] = $config['pay_to_email'];
         $this->fields['password'] = $config['password'];
     }
     $this->curl_config = $config['curl_config'];
     Kohana::Log('debug', 'MoneyBookers Payment Driver Initialized');
 }
开发者ID:VinceOmega,项目名称:mcb-nov-build,代码行数:20,代码来源:Moneybookers.php

示例4: __construct

 /**
  * Sets the config for the class.
  *
  * @param  array  config passed from the library
  */
 public function __construct($config)
 {
     $this->fields['google_API_key'] = $config['google_API_key'];
     $this->fields['google_merchant_id'] = $config['google_merchant_id'];
     $this->fields['google_sandbox_API_key'] = $config['google_sandbox_API_key'];
     $this->fields['google_sandbox_merchant_id'] = $config['google_sandbox_merchant_id'];
     $this->curl_config = $config['curl_config'];
     $this->test_mode = $config['test_mode'];
     if ($this->test_mode) {
         $base64encoding = base64_encode($this->fields['google_sandbox_merchant_id'] . ":" . $this->fields['google_sandbox_API_key']);
     } else {
         $base64encoding = base64_encode($this->fields['google_merchant_id'] . ":" . $this->fields['google_API_key']);
     }
     $this->xml_header = array("Authorization: Basic " . $base64encoding, "Content-Type: application/xml;charset=UTF-8", "Accept: application/xml;charset=UTF-8");
     Kohana::Log('debug', 'Google Checkout Payment Driver Initialized');
 }
开发者ID:momoim,项目名称:momo-api,代码行数:21,代码来源:Googlecheckout.php

示例5: t

            <?php 
echo t("File: <b>%file</b>, line: <b>%line</b>", array("file" => $file, "line" => $line));
?>
          </p>
        </div>
        <? endif ?>

        <? $trace = $PHP_ERROR ? array_slice(debug_backtrace(), 1) : $exception->getTrace(); ?>
        <? $trace = Kohana::backtrace($trace); ?>
        <? if (!empty($trace)): ?>
        <div id="stack_trace">
          <h3>
            <?php 
echo t("And here's how we got there:");
?>
          </h3>
          <?php 
echo $trace;
?>
          <? endif ?>
        </div>
      </div>
      <? else: ?>
      <? $trace = $PHP_ERROR ? array_slice(debug_backtrace(), 1) : $exception->getTraceAsString(); ?>
      <? if (!empty($trace)): ?>
      <? Kohana::Log("error", print_r($trace, 1)); ?>
      <? endif ?>
      <? endif ?>
  </body>
</html>
开发者ID:brocki,项目名称:gallery3,代码行数:30,代码来源:kohana_error_page.php

示例6: batch_complete

 static function batch_complete()
 {
     try {
         notification::send_pending_notifications();
     } catch (Exception $e) {
         Kohana::log("error", "@todo notification_event::batch_complete() failed");
         Kohana::Log("error", $e->getMessage() . "\n" . $e->getTraceAsString());
     }
 }
开发者ID:brocki,项目名称:gallery3,代码行数:9,代码来源:notification_event.php


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