PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
plugins
/
wp-optimize
/
includes
<?php if (!defined('ABSPATH')) die('No direct access allowed'); if (class_exists('Updraft_Ring_Logger')) return; /** * Class Updraft_Ring_Logger */ class Updraft_Ring_Logger extends Updraft_Abstract_Logger { /** * Updraft_Ring_Logger constructor */ public function __construct() { } /** * Returns logger description * * @return string */ public function get_description() { return __('Store the most recent log entries in the WordPress database', 'wp-optimize'); } /** * Returns list of logger options. * * @return array */ public function get_options_list() { return array( 'ring_logger_limit' => __('How many last records store?', 'wp-optimize') ); } /** * Emergency message * * @param string $message * @param array $context * @return void */ public function emergency($message, $context = array()) { $this->log($message, Updraft_Log_Levels::EMERGENCY, $context); } /** * Alert message * * @param string $message * @param array $context * @return void */ public function alert($message, $context = array()) { $this->log($message, Updraft_Log_Levels::ALERT, $context); } /** * Critical message * * @param string $message * @param array $context * @return void */ public function critical($message, $context = array()) { $this->log($message, Updraft_Log_Levels::CRITICAL, $context); } /** * Error message * * @param string $message * @param array $context * @return void */ public function error($message, $context = array()) { $this->log($message, Updraft_Log_Levels::ERROR, $context); } /** * Warning message * * @param string $message * @param array $context * @return void */ public function warning($message, $context = array()) { $this->log($message, Updraft_Log_Levels::WARNING, $context); } /** * Notice message * * @param string $message * @param array $context * @return void */ public function notice($message, $context = array()) { $this->log($message, Updraft_Log_Levels::NOTICE, $context); } /** * Info message * * @param string $message * @param array $context * @return void */ public function info($message, $context = array()) { $this->log($message, Updraft_Log_Levels::INFO, $context); } /** * Debug message * * @param string $message * @param array $context * @return void */ public function debug($message, $context = array()) { $this->log($message, Updraft_Log_Levels::DEBUG, $context); } /** * Log message with any level * * @param string $message * @param mixed $level * @param array $context * @return void */ public function log($message, $level, $context = array()) { if (!$this->is_enabled()) return; $message = gmdate("Y-m-d H:i:s").' ['.Updraft_Log_Levels::to_text($level).'] : '.$this->interpolate($message, $context); $this->add_log($message); } /** * Add message to log * * @param string $message Message to be added to log. */ public function add_log($message) { $log_option_name = $this->get_logger_option_name(); $log_limit = $this->get_logger_limit(); $log = $this->get_log(); $log[] = $message; while (count($log) > 0 && count($log) > $log_limit) { array_shift($log); } update_option($log_option_name, $log); } /** * Return logger option name value * * @return string */ public function get_logger_option_name() { return 'updraft_ring_log'; } /** * Return logger limit value * * @return string */ public function get_logger_limit() { return $this->get_option('ring_logger_limit', 20); } /** * Set logger WordPress option name where log will be stored * * @param string $option_name Name for logger option. */ public function set_logger_option_name($option_name) { $this->set_option('ring_logger_option_name', $option_name); } /** * Return log content * * @return mixed */ public function get_log() { return get_option($this->get_logger_option_name(), array()); } }
[-] class-updraft-logger-interface.php
[edit]
[-] class-wp-optimize-updates.php
[edit]
[-] class-updraft-smush-manager-commands.php
[edit]
[-] class-updraft-abstract-logger.php
[edit]
[-] class-wp-optimize-delay-js.php
[edit]
[-] class-wp-optimize-table-management.php
[edit]
[+]
blockui
[-] class-wp-optimization.php
[edit]
[-] class-wpo-onboarding.php
[edit]
[-] class-updraft-logger.php
[edit]
[-] class-updraft-ring-logger.php
[edit]
[-] class-updraft-smush-manager.php
[edit]
[-] class-wp-optimize-admin.php
[edit]
[-] class-wp-optimizer.php
[edit]
[-] class-wp-optimize-htaccess.php
[edit]
[-] class-wp-optimize-transients-cache.php
[edit]
[-] class-wpo-deactivation.php
[edit]
[-] class-wp-optimize-utils.php
[edit]
[-] class-updraft-email-logger.php
[edit]
[-] class-wpo-image-utils.php
[edit]
[-] class-wp-optimize-browser-cache.php
[edit]
[-] class-wp-optimize-database-information.php
[edit]
[-] class-wp-optimize-install-or-update-notice.php
[edit]
[-] class-wpo-page-optimizer.php
[edit]
[-] class-wp-optimize-performance.php
[edit]
[-] class-wp-optimize-commands.php
[edit]
[-] class-updraft-log-levels.php
[edit]
[-] class-wp-optimize-notices.php
[edit]
[-] class-wp-optimize-404-detector.php
[edit]
[-] class-wpo-uninstall.php
[edit]
[+]
tables
[-] class-wpo-activation.php
[edit]
[-] class-updraftcentral-wp-optimize-commands.php
[edit]
[-] class-wp-optimize-server-information.php
[edit]
[-] class-wp-optimize-options.php
[edit]
[-] class-wp-optimize-preloader.php
[edit]
[-] class-updraft-php-logger.php
[edit]
[-] class-updraft-smush-task.php
[edit]
[+]
..
[-] class-wp-optimize-http-error-codes-trait.php
[edit]
[+]
fragments
[-] class-re-smush-it-task.php
[edit]
[-] class-updraft-file-logger.php
[edit]
[-] class-wp-optimize-404-detector-cron.php
[edit]
[-] class-wpo-ajax.php
[edit]
[+]
list-tables
[-] class-wp-optimize-system-status-report.php
[edit]
[-] class-wp-optimize-gzip-compression.php
[edit]
[-] updraftcentral.php
[edit]
[-] class-wp-optimize-heartbeat.php
[edit]
[-] backward-compatibility-functions.php
[edit]