1

I have done the below, but I do not see any jdbc logging:

  • set my class path so the only jdbc jar is odjbc6_g.jar
  • added to my vm arguments

-Doracle.jdbc.Trace=true -Djava.util.logging.config.file=/tmp/OracleLog.properties

my OracleLog.properties file

.level=SEVERE oracle.jdbc.level=INFO 
oracle.jdbc.handlers=java.util.logging.ConsoleHandler 
java.util.logging.ConsoleHandler.level=INFO 
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter

Any suggestions of anything else I should try?

ab11
  • 19,770
  • 42
  • 120
  • 207
  • 1
    Possible duplicate of [Enable logging for JDBC](https://stackoverflow.com/questions/27060563/enable-logging-for-jdbc) – Ravi Feb 05 '18 at 16:26
  • You are doing basically [everything right](https://docs.oracle.com/database/121/JJDBC/diagnose.htm#JJDBC28886). The only suspect thing is the line `oracle.jdbc.level=INFO` which is in all examples placed as a new line. – Marmite Bomber Feb 05 '18 at 17:06
  • Note also, that the driver logging is rather technical and some experience is required to read it. If you are interested more in the *logical* view of the JDBC access, check the duplicated question mentioned above. – Marmite Bomber Feb 06 '18 at 08:50

1 Answers1

2

I can reproduce the problem using your properties file

.level=SEVERE oracle.jdbc.level=ALL
oracle.jdbc.handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter

I receive only

 Bad level value for property: .level

You must use this properies file (note the new line after SEVERE)

.level=SEVERE 
oracle.jdbc.level=ALL
oracle.jdbc.handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
Marmite Bomber
  • 19,886
  • 4
  • 26
  • 53