title: Where does JMeter keep test/application logs?
body: <p>I want to monitor the logs from my tests (or applications if you will). For example, I might have a log line in the code like this:</p>
  
  <pre><code>logger.info( "dummy log" );
  </code></pre>
  
  <p>However, when I run JMeter like this:</p>
  
  <pre><code>jmeter -n -t foobar.jmx
  </code></pre>
  
  <p>I have no idea where to look for that dummy log. So, where does JMeter keep the logs from the tests? Better yet, how can I configure it?</p>
  
  <p>Thank you very much.</p>
  
  <p><strong>update</strong><br>
  I forgot to mention that the test logs were not found in the default log file <code>jmeter.log</code>. Is that true that the test logs should appear in the <code>jmeter.log</code> unless there are some settings disabling the output of the test logs? </p>
  
  <p><strong>update 2</strong><br>
  I have pasted the jmeter.properties here: <a href="http://pastebin.com/6paTqRrK" rel="noreferrer">http://pastebin.com/6paTqRrK</a></p>
  
  <p>Below are relevant code snippets.</p>
  
  <pre><code>package foo.bar;
  
  import org.junit.Test;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
  import static org.junit.Assert.assertTrue;
  
  public class DummyTest {
      private static final Logger logger = LoggerFactory.getLogger( DummyTest.class.getName() );
  
      @Test
      public void test(){
          System.out.println("dummy message");
          logger.info("dummy log");
          assertTrue( true );
      }
  }
  </code></pre>
  
  <p>Gradle build.gradle:</p>
  
  <pre><code>dependencies {
      compile 'org.codehaus.groovy:groovy-all:2.2.1'
  
      compile 'org.slf4j:slf4j-api:1.7.5'
      runtime 'ch.qos.logback:logback-classic:1.0.13'
      runtime 'ch.qos.logback:logback-core:1.0.13'
  
      testCompile 'junit:junit:4.11'
  }
  
  // bundle everything into a fat jar
  jar {
      from {
          configurations.testRuntime.collect {
              it.isDirectory() ? it : zipTree(it)
          } + sourceSets.main.output + sourceSets.test.output
  
      }
      archiveName = 'junit_sampler.jar'
  }
  
  task updateJar( type: Copy, dependsOn: jar ) {
      from './junit_sampler.jar'
      into "${System.properties['user.home']}/opt/apache-jmeter-2.11/lib/junit"
  }
  </code></pre>
  
  <p><strong>foobar.jmx</strong>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jmeterTestPlan version="1.2" properties="2.6" jmeter="2.11 r1554548"&gt;
    &lt;hashTree&gt;
      &lt;TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Check Logging" enabled="true"&gt;
        &lt;stringProp name="TestPlan.comments"&gt;&lt;/stringProp&gt;
        &lt;boolProp name="TestPlan.functional_mode"&gt;false&lt;/boolProp&gt;
        &lt;boolProp name="TestPlan.serialize_threadgroups"&gt;false&lt;/boolProp&gt;
        &lt;elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"&gt;
          &lt;collectionProp name="Arguments.arguments"/&gt;
        &lt;/elementProp&gt;
        &lt;stringProp name="TestPlan.user_define_classpath"&gt;&lt;/stringProp&gt;
      &lt;/TestPlan&gt;
      &lt;hashTree&gt;
        &lt;ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true"&gt;
          &lt;stringProp name="ThreadGroup.on_sample_error"&gt;continue&lt;/stringProp&gt;
          &lt;elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"&gt;
            &lt;boolProp name="LoopController.continue_forever"&gt;false&lt;/boolProp&gt;
            &lt;stringProp name="LoopController.loops"&gt;3&lt;/stringProp&gt;
          &lt;/elementProp&gt;
          &lt;stringProp name="ThreadGroup.num_threads"&gt;1&lt;/stringProp&gt;
          &lt;stringProp name="ThreadGroup.ramp_time"&gt;1&lt;/stringProp&gt;
          &lt;longProp name="ThreadGroup.start_time"&gt;1399656770000&lt;/longProp&gt;
          &lt;longProp name="ThreadGroup.end_time"&gt;1399656770000&lt;/longProp&gt;
          &lt;boolProp name="ThreadGroup.scheduler"&gt;false&lt;/boolProp&gt;
          &lt;stringProp name="ThreadGroup.duration"&gt;&lt;/stringProp&gt;
          &lt;stringProp name="ThreadGroup.delay"&gt;&lt;/stringProp&gt;
        &lt;/ThreadGroup&gt;
        &lt;hashTree&gt;
          &lt;JUnitSampler guiclass="JUnitTestSamplerGui" testclass="JUnitSampler" testname="JUnit Request" enabled="true"&gt;
            &lt;stringProp name="junitSampler.classname"&gt;foo.bar.DummyTest&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.constructorstring"&gt;&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.method"&gt;test&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.pkg.filter"&gt;&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.success"&gt;Test successful&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.success.code"&gt;1000&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.failure"&gt;Test failed&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.failure.code"&gt;0001&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.error"&gt;An unexpected error occured&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.error.code"&gt;9999&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.exec.setup"&gt;false&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.append.error"&gt;false&lt;/stringProp&gt;
            &lt;stringProp name="junitsampler.append.exception"&gt;false&lt;/stringProp&gt;
            &lt;boolProp name="junitsampler.junit4"&gt;true&lt;/boolProp&gt;
          &lt;/JUnitSampler&gt;
          &lt;hashTree/&gt;
        &lt;/hashTree&gt;
      &lt;/hashTree&gt;
    &lt;/hashTree&gt;
  &lt;/jmeterTestPlan&gt;
  </code></pre>
  
  <p>Somehow, the "dummy log" message just doesn't show up in the jmeter.log.</p>