Skip to content
PHP Ecosystem
Explore

LogPanel

API reference › Yii3 Debug › Panel › LogPanel

final readonly classYii3\Debug\Panel\LogPanel
ImplementsToolbarPanelProviderInterface
Sourcesrc/Panel/LogPanel.php

Presents captured log messages and contributes the total, error, and warning toolbar metrics.

MethodDescriptionDefined by
__construct()Creates the Logs panel with its configured source-frame renderer.LogPanel
hasContent()Reports whether the capture recorded log messages worth opening the panel for.LogPanel
icon()Returns the icon key shared with the built-in Logs navigation entry.LogPanel
id()Returns the identifier associating the panel with its slice of the captured payload.LogPanel
name()Returns the panel title shown in the debugger navigation.LogPanel
render()Renders the detail view, letting the page context drive filtering, sorting, and paging.LogPanel
toolbarItems()Builds the toolbar metrics: the total message count plus the error and warning counts.LogPanel
public function __construct(PHPForge\Debug\Helper\Trace $trace)

Creates the Logs panel with its configured source-frame renderer.

Parameters

ParameterTypeDescription
$traceTraceConfigured renderer of the argument-free source frames shown in the message cells.
public function hasContent(array<string, mixed> $payload): bool

Reports whether the capture recorded log messages worth opening the panel for.

The capture is listed whenever it carries a payload; the detail page and the toolbar chip surface a malformed one when they hydrate it.

Parameters

ParameterTypeDescription
$payloadarray<string, mixed>Serialized panel payload.

Returns

bool: true when the capture carried data; false otherwise.

public function icon(): string

Returns the icon key shared with the built-in Logs navigation entry.

Returns

string: Shared Debug Core icon key.

public function id(): string

Returns the identifier associating the panel with its slice of the captured payload.

Returns

string: Stable panel identifier.

public function name(): string

Returns the panel title shown in the debugger navigation.

Returns

string: Human-readable panel name.

public function render(Yii3\Debug\Panel\PanelRenderInput $input): string

Renders the detail view, letting the page context drive filtering, sorting, and paging.

Parameters

ParameterTypeDescription
$inputPanelRenderInputPayload, request context, and request summary of the page being rendered.

Returns

string: Rendered panel markup.

public function toolbarItems(array<string, mixed> $payload): list<PHPForge\Debug\Toolbar\ToolbarItem>

Builds the toolbar metrics: the total message count plus the error and warning counts.

Parameters

ParameterTypeDescription
$payloadarray<string, mixed>Serialized panel payload.

Returns

list<PHPForge\Debug\Toolbar\ToolbarItem>: Toolbar metrics in display order.