Skip to content

Option to log HTTP request and response as a single message #34550

@bgalek

Description

@bgalek

Hi!
One of my teams asked if our company spring boot starter could support logging requests
and responses in the same log message (extending CommonsRequestLoggingFilter)

Example:

>> INCOMING >> AFTER REQUEST  
Request: GET /api/endpoint?parameter=allegro-pl  
  Body: <empty body>  
Response: Status 200, took 5 ms  
  Body: {"works":true}  

I can think of some potential problems from that approach, BUT I wanted your opinion as CommonsRequestLoggingFilter maintainers!

Have you thought about this feature?
Maybe there was a decision made in spring team no to support such logging?

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions