1). Create a property file (say SQLServerLogging.properties) and copy the following properties:
>>>>>>>>>>>>>
# Specify the handler, the handlers will be installed during VM startup.
handlers= java.util.logging.FileHandler
# Default global logging level.
.level= OFF
java.util.logging.FileHandler.pattern =C:/sqlServer_jdbc.log
java.util.logging.FileHandler.limit = 5000000
java.util.logging.FileHandler.count = 5
#java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter##
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.level = FINE
# Facility specific properties.
com.microsoft.sqlserver.jdbc.level=FINE
>>>>>>>>>>>>>>>>>>
For details refer to https://msdn.microsoft.com/en-us/library/ms378517(v=sql.110).aspx
2). Add the following properties in designer.tra (if testing from Designer) or in the deployed application.tra (if the application is deployed).
>>>>>>>>>>>>>>>>
java.extended.properties=-Djava.util.logging.config.file=C:/SQLServerLogging.properties This path can be changed based on the property file name.
>>>>>>>>>>>>>>>>
3). The log file will be generated in the location "java.util.logging.FileHandler.pattern" present in the properties file.