WooCommerce Code Reference

WC_Log_Handler_Interface

WC Log Handler Interface

Functions that must be defined to correctly fulfill log handler API.

Tags
version
3.3.0

Table of Contents

handle()  : bool
Handle a log entry.

Methods

handle()

Handle a log entry.

public handle(int $timestamp, string $level, string $message, array<string|int, mixed> $context) : bool
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
boolFalse if value was not handled and true if value was handled.