I believe he's referencing this: https://logging.apache.org/log4j/2.x/manual/extending.html#Custom_ContextDataInjector
On 22 March 2017 at 14:48, Christian <[email protected]> wrote: > Thanks Matt and Ralph! > > I also thought if it is possible to use the %replace pattern for this > purpose. I think I will give this a try. > > > @Ralph: What do you mean with "Data Injection stuff"? Do you have any link > a documentation with information about this? > > > Best regards, > > Christian > > > > Am 22.03.2017 um 19:55 schrieb Ralph Goers: > >> If userNumber does not exist in the ThreadContext then nothing will be >> included in the display. I am not aware that we have implemented any way >> to specify a default value for this, but with the Data Injection stuff that >> was added a few releases ago it might be possible. >> >> Ralph >> >> On Mar 22, 2017, at 11:33 AM, Christian <[email protected]> wrote: >>> >>> Hi all, >>> >>> with the pattern /%X{userNumber}/ I am able to display a value I stored >>> in the thread context. >>> >>> Is there any possibilty to display an alternative value if nothing was >>> found and/or an empty value was stored under the key I'm suing (in this >>> case /userNumber/). >>> >>> >>> Thanks and best regards, >>> >>> Christian >>> >>> >> >> --------------------------------------------------------------------- >> 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] > > -- Matt Sicker <[email protected]>
