title: Gradle test log4j.xml
body: <p>Sorry, if this isn't enough information, new to gradle, let me know if more is needed.
  I have a log4j2.xml in a config folder that I define in a gradle.properties file.</p>
  
  <pre><code>project.ext.logConfigFile="./config/log4j2.xml"
  </code></pre>
  
  <p>The structure of my project    </p>
  
  <p>project<br>
  &nbsp;&nbsp;&nbsp;&nbsp;src<br>
  &nbsp;&nbsp;&nbsp;&nbsp;test<br>
  &nbsp;&nbsp;&nbsp;&nbsp;lib<br>
  &nbsp;&nbsp;&nbsp;&nbsp;config<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log4j2.xml </p>
  
  <p>Now when I run gradle test, it says that it can't find the log4j2 configuration. </p>
  
  <p>This is what my build.gradle file looks like..</p>
  
  <pre><code>sourceSets {
      test {
          java {
              srcDirs = ["test"]
          }
      }
      main {
          java {
              srcDirs = ["src"]
          }
      }
  }
  
  
  test {
      testLogging {
          outputs.upToDateWhen {false}
          showStandardStreams = true
          events "PASSED", "STARTED", "FAILED", "SKIPPED"
          afterSuite { desc, result -&gt;
              if (!desc.parent) { // will match the outermost suite
                  println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
        }
      }
    }
  }
  </code></pre>
  
  <p>Been dinking around with things I found on the internet, that's why all those statements in the "testLogging" part. But basically, I have LOGGER.info() statements that aren't coming up because it defaults to errors only.</p>
  
  <pre><code>ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
  </code></pre>
  
  <p>Can I tell gradle test exactly where to go for my log4j2.xml? Something like this? Though I don't think this works....</p>
  
  <pre><code>tasks.withType(Test) { 
       systemProperty 'log4j.configuration', logConfigFile
  }
  </code></pre>
  
  <p>A little stuck right now. Thanks!</p>