class log_entry_dto extends abstract_dto

internal  
 

DTO for a unified log entry.

Wraps message, level, channel and context for downstream loggers.

Methods

array
jsonSerialize()

Default implementation to serialize to JSON using the array representation.

__construct(string $message, log_level $level = log_level::INFO, log_channel $channel = log_channel::SYSTEM, log_context_dto|null $context = null, int|null $timestamp = null)

Constructor.

array
to_array()

Convert log entry to array for serialization/transport.

Details

in abstract_dto at line 38
array jsonSerialize()

Default implementation to serialize to JSON using the array representation.

Return Value

array

at line 42
__construct(string $message, log_level $level = log_level::INFO, log_channel $channel = log_channel::SYSTEM, log_context_dto|null $context = null, int|null $timestamp = null)

Constructor.

Parameters

string $message
log_level $level
log_channel $channel
log_context_dto|null $context
int|null $timestamp

at line 57
array to_array()

Convert log entry to array for serialization/transport.

Return Value

array