To avoid memory problems, allow to set the maximum number of logs to collect, maybe here:
|
public function addLog(string $message, string $type, array $context = []) |
|
{ |
|
$this->logs[] = [ |
|
$type, |
|
$message, |
|
$context, |
|
array_slice(debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS), 1), |
|
]; |
|
} |
|
public function addStatement(array $data): void |
|
{ |
|
$this->statements[] = $data; |
|
} |
one parameter in the constructor with the max number of "rows" or bytes.
To avoid memory problems, allow to set the maximum number of logs to collect, maybe here:
php-web-profiler/src/Traceables/LoggerTraceable.php
Lines 23 to 31 in b012f8a
php-web-profiler/src/Traceables/PdoTraceable.php
Lines 34 to 37 in b012f8a
one parameter in the constructor with the max number of "rows" or bytes.