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

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

Ansible warning on jinja2 braces on when -