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

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -