I'm using JsonPath
for my JSON parsing work in Java. Is there any ways to remove the debug
logs upon running the code?
So basically, I am simply trying to run my parsing code in Maven:
String pageName = JsonPath.read(json, "$['pageInfo']['pageName']");
System.out.println(pageName);
But when running the jar
artifact file, it show the following as the first line:
0 [main] DEBUG com.jayway.jsonpath.internal.path.CompiledPath - Evaluating path: $['pageInfo']['pageName']
How to ignore this line? This appears upon running each JsonPath.read()
call.
UPDATES:
Initially I was getting some red-colored logs from log4j
so added these dependencies. The red logs disappeared, but the above log (now black) appeared!
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
I also add the logBack
dependency. But still the code snippet can not be recognized: