You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
I am trying to send a variable set at runtime through
MDCas aKeyValuePairelement 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.javais that theKeyValuePairelements 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