Skip to content

Navigation Menu

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

Appearance settings

[RFC] Split exception logging from rendering #25266

Copy link
Copy link
Closed
@ro0NL

Description

@ro0NL
Issue body actions
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 4.1

Recently did a project where, for API purpose, we created an exception listener to transform those into specialized json responses.

The funny part is we now effectively disabled exception logging; discovered on prod :-) Because our custom response set, the built-in exception listener no longer runs; thus no logging.

The trick is to copy Symfony\Component\HttpKernel\EventListener\ExceptionListener::logException() and call as needed. Basically you need to dive into internals to figure it out.

Wondering... can we move the logException() logic and make it a (better) feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.