Can we change log4j logging level based on content. Also, can this change be made at library level. Putting if condition around every log statement is not recommended.
For example, let us assume we are logging the value of String testString.
We want to set log level to info if testString contains futest, else keep it at debug.