Skip to content

LogstashAccessEncoder#fieldNames does not change the field name used by ContextJsonProvider #658

@brenuart

Description

@brenuart

Changing default field names on LogstashAccessEncoder by setting the fieldNames property does not change the name of the field used by the ContextJsonProvider.

The cause is the "instanceof" at line https://github.com/logstash/logstash-logback-encoder/blob/main/src/main/java/net/logstash/logback/composite/ContextJsonProvider.java#L57.

The "context" field is applicable to both IAccessEvent and ILoggingEvent and should therefore be declared in CommonLogstashFieldNames instead of LogstashFieldNames.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions