Logback: print text only if a context variable is defined -
i'm using logback logger , i'm putting information in logging context in order print out in log file.
i differentiate printed message based on presence of information in context.
using name
context key:
when
name
key present print like:[name = john] - i'm logging message
when
name
key not present print like:i'm logging message
Comments
Post a Comment