Server IP : 104.21.14.103 / Your IP : 3.145.94.43 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/cwd/wp-content/plugins/woocommerce/includes/abstracts/ |
Upload File : |
<?php /** * Log handling functionality. * * @class WC_Log_Handler * @package WooCommerce\Abstracts */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Abstract WC Log Handler Class * * @version 1.0.0 * @package WooCommerce\Abstracts */ abstract class WC_Log_Handler implements WC_Log_Handler_Interface { /** * Formats a timestamp for use in log messages. * * @param int $timestamp Log timestamp. * @return string Formatted time for use in log entry. */ protected static function format_time( $timestamp ) { return date( 'c', $timestamp ); } /** * Builds a log entry text from level, timestamp and message. * * @param int $timestamp Log timestamp. * @param string $level emergency|alert|critical|error|warning|notice|info|debug. * @param string $message Log message. * @param array $context Additional information for log handlers. * * @return string Formatted log entry. */ protected static function format_entry( $timestamp, $level, $message, $context ) { $time_string = self::format_time( $timestamp ); $level_string = strtoupper( $level ); $entry = "{$time_string} {$level_string} {$message}"; return apply_filters( 'woocommerce_format_log_entry', $entry, array( 'timestamp' => $timestamp, 'level' => $level, 'message' => $message, 'context' => $context, ) ); } }