8000 bug #45302 [HttpKernel][WebProfilerBundle] Fixed error count by log n… · symfony/symfony@5cb5880 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cb5880

Browse files
committed
bug #45302 [HttpKernel][WebProfilerBundle] Fixed error count by log not displayed in WebProfilerBundle (SVillette)
This PR was merged into the 5.4 branch. Discussion ---------- [HttpKernel][WebProfilerBundle] Fixed error count by log not displayed in WebProfilerBundle | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #45183 | License | MIT | Doc PR | - This PR is the following of #45198. Refer to this PR for details. ![image](https://user-images.githubusercontent.com/17042730/152384024-64ffecb3-d895-450b-a994-fe3d54582680.png) Commits ------- 5e1a2cb [HttpKernel] Fixed error count by log not displayed in WebProfilerBundle
2 parents 56dd927 + 5e1a2cb commit 5cb5880

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function getProcessedLogs()
108108

109109
$logs[] = [
110110
'type' => $logType,
111-
'errorCounter' => isset($rawLogData['errorCounter']) ? $rawLogData['errorCounter']->getValue() : 1,
111+
'errorCount' => $rawLog['errorCount'] ?? 1,
112112
'timestamp' => $rawLogData['timestamp_rfc3339']->getValue(),
113113
'priority' => $rawLogData['priority']->getValue(),
114114
'priorityName' => $rawLogData['priorityName']->getValue(),

src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testCollectFromDeprecationsLog()
8080
$this->assertCount(1, $processedLogs);
8181

8282
$this->assertEquals($processedLogs[0]['type'], 'deprecation');
83-
$this->assertEquals($processedLogs[0]['errorCounter'], 1);
83+
$this->assertEquals($processedLogs[0]['errorCount'], 1);
8484
$this->assertEquals($processedLogs[0]['timestamp'], (new \DateTimeImmutable())->setTimestamp(filemtime($path))->format(\DateTimeInterface::RFC3339_EXTENDED));
8585
$this->assertEquals($processedLogs[0]['priority'], 100);
8686
$this->assertEquals($processedLogs[0]['priorityName'], 'DEBUG');

0 commit comments

Comments
 (0)
0