title: How to enable debug logging in PostgreSQL JDBC/HikariCP?
body: <p>I have Spring Boot 1.4.0, HikariCP 2.4.7, slf4j-api 1.7.21 and PostgreSQL JDBC 9.4.1208.</p>
  
  <p>I want to see debug logs from PostgreSQL JDBC because I have <a href="https://stackoverflow.com/questions/38688489/hikaripool-1-connection-is-not-available-request-timed-out-after">some problems</a> with HikariCP:</p>
  
  <pre><code>HikariPool-1 - Connection is not available, request timed out after 42734ms.
  </code></pre>
  
  <p>How can I enable debug logging to see what's going on?</p>
  
  <p>I've tried:</p>
  
  <p>-Adding:</p>
  
  <pre><code>org.postgresql.Driver.setLogLevel(Driver.DEBUG);
  hikariDataSource = new HikariDataSource();
  hikariDataSource.setLogWriter(new PrintWriter(System.out));
  </code></pre>
  
  <p>-Adding to VM options:</p>
  
  <pre><code>-Dorg.slf4j.simpleLogger.defaultLogLevel=debug
  </code></pre>
  
  <p>However, logs are the same as they were.</p>