Question

6
Replies
469
Views
NagendranA6739 Member since 2016 3 posts
Asurion
Posted: 11 months ago
Last activity: 10 months 3 weeks ago
Solved

How to enable Oracle JDBC logging in tomcat

Hi ,

we see connectivity issues to database from app server. the issue is sporadic and affect only one node in multi node cluster and it recovers it self after sometime. we have ruled out DB issues and network issues as it affects only one node for a period of time, when other nodes operates normally.. I wanted to enable ojdbc logging and see if I can get clue for this issue.

I have downloaded the oracle jdbc7_g .jar and replaced the jdbc.jar in tomcat lib and made the below changes.

Created config.properties for logging with below setting

ava.util.logging.FileHandler.pattern = /usr/share/tomcat7/logs/jdbc.log

java.util.logging.FileHandler.limit = 50000

java.util.logging.FileHandler.count = 1

java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter

handlers = java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level = ALL

java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

oracle.jdbc.connector.level = FINE

oracle.jdbc.driver.level = FINEST

oracle.jdbc.internal.level = FINE

#oracle.jdbc.oci.level = FINE

#oracle.jdbc.oracore.level = FINE

oracle.jdbc.pool.level = FINE

#oracle.jdbc.rowset.level = FINE

oracle.jdbc.util.level = FINE

#oracle.jdbc.xa.level = FINE

oracle.jdbc.xa.client.level = FINE

#oracle.jpub.level = FINE

#oracle.net.ns.level = TRACE_20

#oracle.sql.level = FINE

Enabled oracle debug logging in tomcat7.conf in Catalina_opts

-Doracle.jdbc.Trace=true -Djava.util.logging.config.file=/usr/share/tomcat7/conf/myConfig.properties

i'm using tomcat 7

but still i'm not seeing the debug logs.. can anyone please let me know if I'm missing anything.

Thanks

Nagendran Arumugam

Cloud Services System Administration Low-Code App Development Installation and Deployment Data Integration
Share this page LinkedIn