AW: Do Route-keys of Routing appender of Log4j2 need to use "$$" or "$" for unresolved expressions?

Thorsten Schöning <[email protected]> Tue, 6 May 2025 14:53:19 +0000
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <PR3P190MB0985CADFAEAFE87843FB3DE0E289A@PR3P190MB0985.EURP190.PROD.OUTLOOK.COM>
Von: Piotr P. Karwasz <[email protected]>=0A=
Gesendet: Dienstag, 6. Mai 2025 15:29=0A=
An: [email protected]=0A=
Betreff: Re: Do Route-keys of Routing appender of Log4j2 need to use "$$" o=
r "$" for unresolved expressions?=0A=
=0A=
>  * In the first case the value of `key` will always be a literal=0A=
>    `${ctx:foo}`.=0A=
>  * In the second case Log4j Core will expand `${ctx:foo}` at=0A=
>    configuration time. Since the configuration of Log4j Core happens=0A=
>    very early in the startup sequence, `foo` will almost certainly be=0A=
>    undefined, so `key` will be a literal `${ctx:foo}`. In the very=0A=
>    unlikely case `foo` is defined at configuration time, however, the=0A=
>    value of `foo` will be substituted and your configuration will not=0A=
>    work as expected.=0A=
=0A=
Thanks Piotr! So "$$" at both places is correct in my case and "children" r=
eally refers to the body of the "Route".=