I'm using a library called JSONPath
to parse JSON messages in Java. I should always add the following code to make its redundent logs to disappear.
Is there any ways to do this in the log4j .xml
file or somewhere other than my code itself? I just don't want to see this inside the technical code.
// must be added for the JSONPath debug logs to disappear.
LoggerContext logContext = (LoggerContext) LoggerFactory.getILoggerFactory();
ch.qos.logback.classic.Logger log = logContext.getLogger("com.jayway.jsonpath.internal.path.CompiledPath");
log.setLevel(Level.INFO);