for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of Blitz PHP framework.
*
* (c) 2022 Dimitri Sitchet Tomkeu <[email protected]>
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace BlitzPHP\Debug\Toolbar\Collectors;
* Collecteur de logs pour la barre d'outils de débogage
* @credit <a href="https://codeigniter.com">CodeIgniter 4.2 - CodeIgniter\Debug\Toolbar\Collectors\Logs</a>
class LogsCollector extends BaseCollector
{
* {@inheritDoc}
protected bool $hasTimeline = false;
protected bool $hasTabContent = true;
protected string $title = 'Logs';
* Nos données collectées
protected array $data = [];
public function display(): array
return [
'logs' => $this->collectLogs(),
];
}
public function isEmpty(): bool
$this->collectLogs();
return $this->data === [];
* Icon from https://icons8.com - 1em package
public function icon(): string
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACYSURBVEhLYxgFJIHU1FSjtLS0i0D8AYj7gEKMEBkqAaAFF4D4ERCvAFrwH4gDoFIMKSkpFkB+OTEYqgUTACXfA/GqjIwMQyD9H2hRHlQKJFcBEiMGQ7VgAqCBvUgK32dmZspCpagGGNPT0/1BLqeF4bQHQJePpiIwhmrBBEADR1MRfgB0+WgqAmOoFkwANHA0FY0CUgEDAwCQ0PUpNB3kqwAAAABJRU5ErkJggg==';
* S'assure que les données ont été collectées.
protected function collectLogs()
if ($this->data !== []) {
return $this->data;
return $this->data = single_service('logger')->logCache;