WC_Log_Handler
in package
implements
WC_Log_Handler_Interface
Abstract WC Log Handler Class
Tags
Interfaces, Classes and Traits
- WC_Log_Handler_Interface
- WC Log Handler Interface
Table of Contents
- format_entry() : string
- Builds a log entry text from level, timestamp and message.
- format_time() : string
- Formats a timestamp for use in log messages.
- get_backtrace() : array<string|int, mixed>
- Get a backtrace that shows where the logging function was called.
Methods
format_entry()
Builds a log entry text from level, timestamp and message.
protected
static format_entry(int $timestamp, string $level, string $message, array<string|int, mixed> $context) : string
Parameters
- $timestamp : int
-
Log timestamp.
- $level : string
-
emergency|alert|critical|error|warning|notice|info|debug.
- $message : string
-
Log message.
- $context : array<string|int, mixed>
-
Additional information for log handlers.
Return values
string — Formatted log entry.format_time()
Formats a timestamp for use in log messages.
protected
static format_time(int $timestamp) : string
Parameters
- $timestamp : int
-
Log timestamp.
Return values
string — Formatted time for use in log entry.get_backtrace()
Get a backtrace that shows where the logging function was called.
protected
static get_backtrace() : array<string|int, mixed>