When a value doesn’t exist and you don’t specify a default value then the value 
of the variable string is itself. So If you code ${ctx:ndc} and there is no 
value for that you will see ${ctx:ndc} in the output.  Whenever StrSubstitutor 
finds a variable of the form $${ctx:ndc} it will simply strip the leading $ and 
you will get ${ctx:ndc}.

Ralph

> On Feb 20, 2020, at 12:37 PM, Surendar Chandra <[email protected]> 
> wrote:
> 
> I'm building a JSON log by using something like this in my xml config:
> 
> <KeyValuePair key="ndc" value="$${ctx:ndc}"/>
> 
> If I use a single $, for one particular value, the value seems to be
> stuck at a constant. Other variables are fine. If I use a double $,
> then it seems to work in all scenarios. I guess I should be using $$
> but why is it flaky with a single $. Documentation states "During
> initial configuration processing the first '$' will be removed.". In
> that case I'd expect it to be {ctx:ndc} and not some other string.
> 
> Thanks
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to