WooCommerce Code Reference

WC_Log_Handler
in package
implements WC_Log_Handler_Interface

Abstract WC Log Handler Class

Tags
version
1.0.0

Interfaces, Classes and Traits

WC_Log_Handler_Interface
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.

Methods

format_entry()

Builds a log entry text from level, timestamp and message.

protected static format_entry(int $timestamp, string $level, string $message, array $context) : string
Parameters
$timestamp : int

Log timestamp.

$level : string

emergency|alert|critical|error|warning|notice|info|debug.

$message : string

Log message.

$context : array

Additional information for log handlers.

Return values
stringFormatted 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
stringFormatted time for use in log entry.