Karate: Is there a way to disable log when using retry?

No you con’t disable logs per request, you can switch off everything by setting the log level to INFO – but I guess you don’t want that. 100 retries sounds very unusual to me. You can try your luck with a feature request – but I can tell you that this would be low priority unless someone contributes code.

If this really bothers you, write some custom Java code to do this polling + HTTP request and call it from Karate.

EDIT: I think I have a solution that will work for you. You can completely disable the Karate logs appearing on the console – while still having the HTML report with this change to the logback-test.xml:

<root level="warn">
    <!-- <appender-ref ref="STDOUT" /> -->
    <appender-ref ref="FILE" />
</root>

So just commenting out the console log appender will do the trick !

Also read: https://github.com/intuit/karate#report-verbosity

Leave a Comment