title: Change Spring framework log level in simple example project?
body: <p>When following <a href="http://spring.io/guides/gs/relational-data-access/" rel="nofollow noreferrer">this</a> Spring example I was expecting to see output like this:</p>
  
  <pre><code>Creating tables
  Inserting customer record for John Woo
  Inserting customer record for Jeff Dean
  ...
  </code></pre>
  
  <p>Instead, I got some <code>DEBUG</code> log messages interspersed between every line:</p>
  
  <pre><code>Creating tables
  12:31:16.474 [main] DEBUG o.s.jdbc.core.JdbcTemplate - Executing SQL statement [drop table customers if exists]
  12:31:16.484 [main] DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
  12:31:16.484 [main] DEBUG o.s.j.d.SimpleDriverDataSource - Creating new JDBC Driver Connection to [jdbc:h2:mem]
  ...
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/21739578/how-to-disable-spring-logging-debug-messages">These</a> <a href="https://stackoverflow.com/questions/10905578/how-to-turn-off-spring-3-debug-logging">various</a> <a href="https://stackoverflow.com/questions/4733522/changing-spring-containers-log-level-setting">answers</a> seem to indicate that this can be resolved by changing the log level in my <code>log4j.properties</code> file. However, in following <a href="http://spring.io/guides/gs/relational-data-access/" rel="nofollow noreferrer">the Spring example</a> a <code>log4j.properties</code> file is never mentioned.</p>
  
  <p>Interestingly, Spring does appear to be using <code>log4j</code> internally:</p>
  
  <pre><code>$ grep -R "log4j" *
  Binary file build/libs/gs-relational-data-access-0.1.0.jar matches
  </code></pre>
  
  <p>I imagine I could use <code>log4j</code> to fix this problem, but <a href="https://logging.apache.org/log4j/1.2/manual.html" rel="nofollow noreferrer">the manual</a> doesn't seem to have information on where to put <code>log4j.properties</code> or how to integrate it into this project.</p>
  
  <p>How do I change the log level to remove those <code>DEBUG</code> statements?</p>
  
  <p>If I need to use a <code>log4j.properties</code> file, where do I place it? Do I need to tie it to my <code>build.gradle</code> file, or reference it in my <code>.java</code> files somehow?</p>