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 <christ...@myvm.de> 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: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org