本文整理汇总了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 "";
}
}
示例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 "";
}
}
示例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');
}
示例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');
}
示例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>
示例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());
}
}