Closed huntkalio closed 2 months ago
When I use schema.validate(stringData, OutputFormat.BOOLEAN) function , it default turn on setFailFast to ture.But if setFailFast is set to ture, it will throw FailFastAssertionException when validate fail. And then it will always print "Failed to apply pattern" due to: - https://github.com/networknt/json-schema-validator/blob/12807f33a19a7981452b8eabf9e1bcdae30df5c6/src/main/java/com/networknt/schema/PatternValidator.java#L68;
Now, I have to config failFast to false to remove the print, but this will impact performance.
When throw FailFastAssertionException exception, may not print ERROR level logs?
Thanks for the bug report.
As a workaround you can just disable the log for com.networknt.schema.PatternValidator.
com.networknt.schema.PatternValidator
For instance for logback
<logger name="com.networknt.schema.PatternValidator" level="OFF"/>
When I use schema.validate(stringData, OutputFormat.BOOLEAN) function , it default turn on setFailFast to ture.But if setFailFast is set to ture, it will throw FailFastAssertionException when validate fail. And then it will always print "Failed to apply pattern" due to: - https://github.com/networknt/json-schema-validator/blob/12807f33a19a7981452b8eabf9e1bcdae30df5c6/src/main/java/com/networknt/schema/PatternValidator.java#L68;
Now, I have to config failFast to false to remove the print, but this will impact performance.
When throw FailFastAssertionException exception, may not print ERROR level logs?