Skip to content

How can I add request header in access logback of spring cloud gateway? #1827

Open
@ShahzebAnsari

Description

@ShahzebAnsari

I want to add a request header in access logback. So, I tried to find some header configuration. I found %header{header_name} configuration, but It works only in logback-access.xml. For reactor netty access log there was no header configuartion.

I tried to use MDC with reactive context. There were some articles like (https://simonbasle.github.io/2018/02/contextual-logging-with-reactor-context-and-mdc/). but I did'nt get.

Please help me with it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions