I have below logback-test.xml file placed under the src/test/resources folder.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender> -->
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit.karate" level="DEBUG"/>
<logger name="demo" level="INFO"/>
<logger name="mock" level="INFO"/>
<root level="warn">
<!-- <appender-ref ref="STDOUT" /> -->
<appender-ref ref="FILE" />
</root>
</configuration>
It was working fine till 1.4.1. When I switched to 1.5, it stopped generating the logs.
See if this thread helps: https://github.com/karatelabs/karate/issues/2436
Also if you have a lot of other dependencies, be aware that you can use the Shaded fat JAR which may solve the problem.