LogPanel
API reference › Yii3 Debug › Panel › LogPanel
Presents captured log messages and contributes the total, error, and warning toolbar metrics.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(PHPForge\Debug\Helper\Trace $trace)Creates the Logs panel with its configured source-frame renderer.
Parameters
| Parameter | Type | Description |
|---|---|---|
$trace | Trace | Configured renderer of the argument-free source frames shown in the message cells. |
hasContent()
Section titled “hasContent() ”public function hasContent(array<string, mixed> $payload): boolReports 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
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, | Serialized panel payload. |
Returns
bool: true when the capture carried data; false otherwise.
icon()
Section titled “icon() ”public function icon(): stringReturns the icon key shared with the built-in Logs navigation entry.
Returns
string: Shared Debug Core icon key.
public function id(): stringReturns the identifier associating the panel with its slice of the captured payload.
Returns
string: Stable panel identifier.
name()
Section titled “name() ”public function name(): stringReturns the panel title shown in the debugger navigation.
Returns
string: Human-readable panel name.
render()
Section titled “render() ”public function render(Yii3\Debug\Panel\PanelRenderInput $input): stringRenders the detail view, letting the page context drive filtering, sorting, and paging.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | PanelRenderInput | Payload, request context, and request summary of the page being rendered. |
Returns
string: Rendered panel markup.
toolbarItems()
Section titled “toolbarItems() ”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
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, | Serialized panel payload. |
Returns
list<PHPForge\Debug\Toolbar\ToolbarItem>: Toolbar metrics in display order.