Logging tool for JDBC


News: Logging tool for JDBC

  1. Logging tool for JDBC (13 messages)

    A full-featered tool for JDBC calls tracing is known as jdbcdslog.

    Features include:
    - can be attached on Connection, Driver or DataSource(XA,Pooling) levels
    - can log bind parameters for PreparedStatement and CallableStatement calls
    - can log result of queries from ResultSet objects
    - can log queries execution time
    - logging engine agnostic (thanks to SLF4J, you can use most of popular logging libraries like log4j, apache common logging, java logging or simple printing to System.out)

    You have three choices how to configure logging proxy: 

    - wrap JDBC Connection object in your code. 
    You can use construction like following in this case:
    Connection loggingConnection = ConnectionLoggingProxy.wrap(originalConnection); 

    - configure JDBC Driver logging proxy. 
    In this case you should use org.jdbcdslog.DriverLoggingProxy instead of the original JDBC Driver class and use jdbcdslog URL format for connection URL parameter:
    - configure JDBC DataSource logging proxy.

    In this case you should use org.jdbcdslog.ConnectionPoolXADataSourceProxy class instead of your original DataSource class and pass additional parameter targetDS to the DataBase or URL setting for DataSource.

    For more information, configuration examples, jar files and sources please look at project web site: http://code.google.com/p/jdbcdslog/.

    Edited by: Staff.

    Edited by: jvaughan on Mar 30, 2010 1:12 PM Edited by: staff.

    Threaded Messages (13)

  2. It's heavily spring focused.   But it's let me find some really bad jdbc calls performance issues in a similar way to the described tool in production environments.   As a down (or up) side, it's heavily spring focused.

  3. Cool![ Go to top ]

    Finally I can see the parameters used in queries! Congratulations, a small but very useful tool.
  4. Logging tool for JDBC[ Go to top ]

    Very cool!
  5. Good and bad[ Go to top ]

    It's very good in like "finally, someone added something useful to the community".

    The bad is, this should be built in to JDBC as an easy to use feature. Period. Why did it take someone external to SUN to build this?
  6. Good and bad[ Go to top ]

    Here are my suggesion:

    first,it's better to  be easy to shift to product enviroment from development enviroment ,that is not change the code

    second, it must be configurable to log some special class not all class ,like log4j

  7. This is a project similar to ironeye's p6spy. That said, p6spy has fallen by the wayside, you might say, so it's good someone's picking the concept back up.

    I don't mind if it's not perfect yet. Configuration can be changed, folks. :)
  8. Logging tool for JDBC[ Go to top ]

    Great, yet another JDBC logger! This is becoming a commodity! :-D

    I have also started work to integrate JDBC profiling into my Java EE monitoring utility: MessAdmin. While it is not yet publicly available, I can send a pre-release version if anyone is interested (my email is on the project's home page).
  9. Logging tool for JDBC[ Go to top ]

    Great, yet another JDBC logger! This is becoming a commodity! :-D

    I agree, there is a number of different projects with similar goals. I started my own project because at some moment I didn't find any tool which could match my needs: XA Pooled DS support, no code changes for deployment, smooth output. After everything has been implemented I just thought: why don't share my effort with community.
  10. Logging tool for JDBC[ Go to top ]

    Worked right away. Thanks for great work!!!

  11. Logging tool for JDBC[ Go to top ]

    yet another tool like http://code.google.com/p/log4jdbc/
  12. jxinsight[ Go to top ]

    it is interesting to see it years later. JxInsight is doing jdbc logging for many years.
  13. Has anybody managed to set this up on WebSphere 6.1 using DataSource???
  14. Performance using cglib[ Go to top ]

    How's the performance compared by using cglib proxy?