Problem with log4j using javaexec

I’m executing a built jar file in a gradle script where I’m using the javaexec task. When I execute in gradle I get all DEBUG outputs from my java class. I’ve placed in most of the typical locations including the project path, resource directory, and directory of the built jar, but it always shows all debug message despite the configuration file being set otherwise. As a last attempt I tried to set it up using a system property like below. How do I get gradle to use the correct log4j settings.

I’m using log4j version log4j-1.2.17.

javaexec {
                    classpath sourceSets.main.runtimeClasspath jar.archivePath
                args=["-wsdl", wsdl, "-projectDir", proj, "-app", app, "-commonProjectDir", "C:\TestDir"]