8000 Apply code review suggestions · symfony/symfony@2f90e0b · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f90e0b

Browse files
author
Omer LAKRAA
committed
Apply code review suggestions
1 parent cc68a33 commit 2f90e0b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,6 @@ private function addExceptionsSection(ArrayNodeDefinition $rootNode): void
13461346
->end()
13471347
->scalarNode('log_channel')
13481348
->info('The channel of log message. Null to let Symfony decide.')
1349-
->end()
13501349
->end()
13511350
->end()
13521351
->end()

src/Symfony/Component/HttpKernel/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CHANGELOG
55
---
66

77
* Remove `@internal` flag and add `@final` to `ServicesResetter`
8-
* Add a new logging channel for exceptions to provide better granularity and control over exception logging.
8+
* Allow configuring the logging channel per type of exceptions in ErrorListener
99

1010
7.1
1111
---

src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ public static function getSubscribedEvents(): array
164164
*
165165
* @param ?string $logChannel
166166
*/
167-
protected function logException(\Throwable $exception, string $message, ?string $logLevel = null, /* , ?string $logChannel = null */): void
167+
protected function logException(\Throwable $exception, string $message, ?string $logLevel = null, /* ?string $logChannel = null */): void
168168
{
169-
$logChannel = 3 < \func_num_args() ? \func_get_arg(3) : $this->resolveLogChannel($exception);
169+
$logChannel = (3 < \func_num_args() ? \func_get_arg(3) : null) ?? $this->resolveLogChannel($exception);
170170

171171
$logLevel ??= $this->resolveLogLevel($exception);
172172

0 commit comments

Comments
 (0)
0