title: How to log/trace mssql jdbc driver from java?
body: <p>I would like to log all actions(especially the connectivity related ones) from my mssql-jdbc driver.</p>
  
  <p>I tried to follow <a href="https://docs.microsoft.com/en-us/sql/connect/jdbc/tracing-driver-operation" rel="nofollow noreferrer">these instructions</a>, but without luck.</p>
  
  <p>I tried to create a new logger.properties file on my desktop</p>
  
  <p>included
  <code>-Djava.util.logging.config.file=C:\Users\myUser\Desktop\logging.properties</code>
  in my jvm.options file.</p>
  
  <p>Put these parameters in the logging.properties file</p>
  
  <pre><code>handlers = java.util.logging.FileHandler
  .level = OFF
  java.util.logging.FileHandler.pattern= %h/java%u.log
  java.util.logging.FileHandler.limit= 5000000
  java.util.logging.FileHandler.count= 20
  java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
  java.util.logging.FileHandler.level = FINEST
  com.microsoft.sqlserver.jdbc.level = FINEST
  </code></pre>
  
  <p>From here i was under the impression it would log all jdbc activities to a .log file in my userhome directory. But it doesn't.</p>
  
  <p>What am I doing wrong here?
  Or are there any other ways to log jdbc activity?</p>