Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6d09ac5

Browse files
committed
Document log_channel
1 parent0d01dbc commit6d09ac5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎reference/configuration/framework.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ exceptions
10251025

10261026
**type**: ``array``
10271027

1028-
Defines the:ref:`log level</logging>` and HTTP status code applied to the
1028+
Defines the:ref:`log level</logging>`,:ref:`log channel</logging>` and HTTP status code applied to the
10291029
exceptions that match the given exception class:
10301030

10311031
..configuration-block::
@@ -1038,6 +1038,7 @@ exceptions that match the given exception class:
10381038
Symfony\Component\HttpKernel\Exception\BadRequestHttpException:
10391039
log_level:'debug'
10401040
status_code:422
1041+
log_channel:'custom_channel'
10411042
10421043
..code-block::xml
10431044
@@ -1055,6 +1056,7 @@ exceptions that match the given exception class:
10551056
class="Symfony\Component\HttpKernel\Exception\BadRequestHttpException"
10561057
log-level="debug"
10571058
status-code="422"
1059+
log-channel="custom_channel"
10581060
/>
10591061
<!-- ...-->
10601062
</framework:config>
@@ -1070,9 +1072,14 @@ exceptions that match the given exception class:
10701072
$framework->exception(BadRequestHttpException::class)
10711073
->logLevel('debug')
10721074
->statusCode(422)
1075+
->logChannel('custom_channel')
10731076
;
10741077
};
10751078
1079+
..versionadded::7.3
1080+
1081+
The ``log_channel`` option was introduced in Symfony 7.3.
1082+
10761083
The order in which you configure exceptions is important because Symfony will
10771084
use the configuration of the first exception that matches ``instanceof``:
10781085

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp