LogCounts
API reference › Debug Core › Panel › Log › LogCounts
Typed view-model for the log-level totals shown in the detail view’s summary header.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$errors readonly constructor | int | Number of messages at LogLevel::ERROR. | LogCounts |
$info readonly constructor | int | Number of messages at LogLevel::INFO. | LogCounts |
$total readonly constructor | int | Total number of log messages captured for the request. | LogCounts |
$trace readonly constructor | int | Number of messages at LogLevel::TRACE. Default: 0. | LogCounts |
$warnings readonly constructor | int | Number of messages at LogLevel::WARNING. | LogCounts |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates the log-level totals for the detail view. | LogCounts |
fromRows() static | Builds log-level totals from the captured rows. | LogCounts |
hasErrors() | Returns whether at least one error-level message was captured. | LogCounts |
hasInfo() | Returns whether at least one info-level message was captured. | LogCounts |
hasTrace() | Returns whether at least one trace-level message was captured. | LogCounts |
hasWarnings() | Returns whether at least one warning-level message was captured. | LogCounts |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(int $total, int $errors, int $warnings, int $info, int $trace = 0)Creates the log-level totals for the detail view.
Parameters
| Parameter | Type | Description |
|---|---|---|
$total | int | |
$errors | int | |
$warnings | int | |
$info | int | |
$trace | int |
fromRows()
Section titled “fromRows() ”public static function fromRows(list<PHPForge\Debug\Panel\Log\LogRow> $rows): selfBuilds log-level totals from the captured rows.
hasErrors()
Section titled “hasErrors() ”public function hasErrors(): boolReturns whether at least one error-level message was captured.
Returns
bool
hasInfo()
Section titled “hasInfo() ”public function hasInfo(): boolReturns whether at least one info-level message was captured.
Returns
bool
hasTrace()
Section titled “hasTrace() ”public function hasTrace(): boolReturns whether at least one trace-level message was captured.
Returns
bool
hasWarnings()
Section titled “hasWarnings() ”public function hasWarnings(): boolReturns whether at least one warning-level message was captured.
Returns
bool