function LoggerDataCollector::getContainerDeprecationLogs
1 call to LoggerDataCollector::getContainerDeprecationLogs()
- LoggerDataCollector::lateCollect in vendor/
symfony/ http-kernel/ DataCollector/ LoggerDataCollector.php - Collects data as late as possible.
File
-
vendor/
symfony/ http-kernel/ DataCollector/ LoggerDataCollector.php, line 174
Class
- LoggerDataCollector
- @author Fabien Potencier <fabien@symfony.com>
Namespace
Symfony\Component\HttpKernel\DataCollectorCode
private function getContainerDeprecationLogs() : array {
if (null === $this->containerPathPrefix || !is_file($file = $this->containerPathPrefix . 'Deprecations.log')) {
return [];
}
if ('' === ($logContent = trim(file_get_contents($file)))) {
return [];
}
$bootTime = filemtime($file);
$logs = [];
foreach (unserialize($logContent) as $log) {
$log['context'] = [
'exception' => new SilencedErrorContext($log['type'], $log['file'], $log['line'], $log['trace'], $log['count']),
];
$log['timestamp'] = $bootTime;
$log['timestamp_rfc3339'] = (new \DateTimeImmutable())->setTimestamp($bootTime)
->format(\DateTimeInterface::RFC3339_EXTENDED);
$log['priority'] = 100;
$log['priorityName'] = 'DEBUG';
$log['channel'] = null;
$log['scream'] = false;
unset($log['type'], $log['file'], $log['line'], $log['trace'], $log['count']);
$logs[] = $log;
}
return $logs;
}