Skip to content
This repository was archived by the owner on Jan 16, 2018. It is now read-only.
This repository was archived by the owner on Jan 16, 2018. It is now read-only.

KeyValuePair with ContextMapLookup does not resolve variable #33

Description

@goober

I am trying to send a variable set at runtime through MDC as a KeyValuePair element by specifying the following element:

<KeyValuePair key="userId" value="$${ctx:userId}"/>

However, the variable cannot be resolved. In the case where I set the variable as part of the PatternLayout it is resolved fine.

What I can find out from the code in GelfAppender.java is that the KeyValuePair elements are added once at creation, but runtime variables are never resolved.

Before I dig into fixing my issue, and creating a pull request I would like to know if this is a known issue, or if there is another way to provide ContextMapLookup variables as KeyValuePair elements.

Note also that variables provided at startup e.g. ${env:APPLICATION_NAME} are resolved just fine

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