Flow PHP

ConsoleLogExporter implements LogExporter

Read onlyYes
FinalYes

Console exporter for logs with ASCII table visualization.

Outputs log records to the console in a framed table format with optional ANSI colors based on severity level. Table width is calculated dynamically based on content.

Interfaces

LogExporter
Interface for exporting log records to external systems.

Methods

__construct()  : mixed
export()  : bool
Export a batch of log entries.
transports()  : array<string|int, Transport>
Get the transports used by this exporter.

Methods

__construct()

public __construct([bool $colors = true ][, null|int $maxBodyLength = null ][, null|resource $outputStream = null ]) : mixed
Parameters
$colors : bool = true

Whether to use ANSI colors

$maxBodyLength : null|int = null

Maximum length for body+attributes column (null = no limit)

$outputStream : null|resource = null

Output stream (default: STDOUT)

export()

Export a batch of log entries.

public export(array<string|int, LogEntry$entries) : bool
Parameters
$entries : array<string|int, LogEntry>
Return values
bool

True on success, false on failure


        
On this page

Search results