本文整理汇总了PHP中GFLogging类的典型用法代码示例。如果您正苦于以下问题:PHP GFLogging类的具体用法?PHP GFLogging怎么用?PHP GFLogging使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GFLogging类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: log_error
static function log_error($message = '', $data = null)
{
$function = self::get_print_function();
self::$errors[] = array('message' => $message, 'data' => $data);
if (class_exists("GFLogging")) {
GFLogging::include_logger();
GFLogging::log_message('gravityview', $function($message, true) . $function($data, true), KLogger::ERROR);
}
}
示例2: log_error
static function log_error($message = '', $data = null)
{
$function = self::get_print_function();
$error = array('message' => $message, 'data' => $data, 'backtrace' => function_exists('wp_debug_backtrace_summary') ? wp_debug_backtrace_summary(null, 3) : '');
if (!in_array($error, self::$errors)) {
self::$errors[] = $error;
}
if (class_exists("GFLogging")) {
GFLogging::include_logger();
GFLogging::log_message('gravityview', $function($message, true) . $function($data, true), KLogger::ERROR);
}
}
示例3: log
/**
* Send a message to the log files
* @param str $message The message to write
* @param bool $debug Should this message only be written if WP_DEBUG is true?
* @return void
*/
protected function log($message, $debug = false)
{
if (!$debug || WP_DEBUG) {
error_log(sprintf('GFDP: %s', $message));
}
if (class_exists('GFLogging')) {
GFLogging::include_logger();
$level = $debug ? KLogger::ERROR : KLogger::DEBUG;
// Treat messages shown with WP_DEBUG on as errors
GFLogging::log_message('gfdp', $message, $level);
}
}
开发者ID:cimburadotcom,项目名称:gravity-forms-duplicate-prevention,代码行数:18,代码来源:gravityforms-duplicateprevention.php
示例4: log_debug
private static function log_debug($message)
{
if (class_exists("GFLogging")) {
GFLogging::include_logger();
GFLogging::log_message(self::$slug, $message, KLogger::DEBUG);
}
}
示例5: log_debug
/**
* Writes an error message to the Gravity Forms log. Requires the Gravity Forms logging Add-On.
*
* Not intended to be overridden by Add-Ons.
*
* @ignore
*/
public function log_debug($message)
{
if (class_exists("GFLogging")) {
GFLogging::include_logger();
GFLogging::log_message($this->_slug, $message, KLogger::DEBUG);
}
}
示例6: log_debug
public static function log_debug($message)
{
if (class_exists("GFLogging")) {
GFLogging::include_logger();
GFLogging::log_message("gravityforms", $message, KLogger::DEBUG);
}
}
示例7: log
private static function log($message, $type)
{
if (class_exists("GFLogging")) {
GFLogging::log_message(self::$slug, $message, $type);
}
}
示例8: uninstall
public static function uninstall()
{
if (!GFLogging::has_access("gravityforms_logging_uninstall")) {
die(__("You don't have adequate permission to uninstall the Gravity Forms Logging Add-On.", "gravityformslogging"));
}
//removing options
delete_option("gf_logging_settings");
//deleting log files
self::delete_log_files();
//Deactivating plugin
$plugin = "gravityformslogging/logging.php";
deactivate_plugins($plugin);
update_option('recently_activated', array($plugin => time()) + (array) get_option('recently_activated'));
}
示例9: log_debug
/**
* write an debug message log via the Gravity Forms Logging Add-On
* @param string $message
*/
public static function log_debug($message)
{
if (class_exists('GFLogging')) {
GFLogging::include_logger();
GFLogging::log_message('gfeway', self::sanitiseLog($message), KLogger::DEBUG);
}
}