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 <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



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to