log4jdbc is a JDBC driver that can log SQL and/or JDBC calls (and optionally SQL timing information) for other jdbc drivers using the Simple Logging Facade For Java (SLF4J) logging system.
Be the first to post a text review of log4jdbc. Rate and review a project by clicking thumbs up or thumbs down in the right column.
In this release, I've cleaned up the generated SQL a bit and added a bunch more options for controlling the SQL output. You can now turn on and off the type of SQL you want to log. For example, you might want to log only INSERT SQL statements and generate a SQL script from the logger output. I also added an extra logger that shows whenever a new connection is opened, or a connection is closed. It also dumps all open connection numbers at each open and close event, so you can see how many connections your program uses as it progresses (great for detecting connections leaks!) I reorganized the documentation to hopefully make things a little more clear, especially with the growing list of options. The two most ofen requested features for log4jdbc are Maven support and DataSource support. I plan on getting these in before the 1.2 final is out. Please be patient! For documentation and download, go to http://log4jdbc.sourceforge.net
2008-11-08 1.2 alpha 1 Release o added a new logger "jdbc.connection" to dump connection open and close events as well as dumping all open connection numbers. This is very useful for hunting down connection leak problems. o several new options to produce better SQL output: log4jdbc.dump.booleanastruefalse - many RDBMS's don't have a native boolean type and store booleans as a 1 or 0. Setting this option to false will show boolean bind variables as 1 or 0. Setting this to true will show the boolean as true or false. (Note that the default for this setting is false, contrary to the previous way log4jdbc worked.) log4jdbc.dump.sql.maxlinelength - can be used to insert line breaks into long running SQL (at white space positions.) previous versions of log4jdbc did this automatically with a value of 90 (the default value is 90.) This line breaking can be turned off completely by setting this to 0. log4jdbc.dump.fulldebugstacktrace - can be used in extreme debugging circumstances when you want to be able to see the full stack trace in the debug output. Be extra careful when using this as it will obviously produce much much more logging output. o dump a null bind variable as NULL instead of <null> for more accurate and reuseable SQL output. o several new options for controlling what types of SQL statements are logged: log4jdbc.dump.sql.select default value is true log4jdbc.dump.sql.insert default value is true log4jdbc.dump.sql.update default value is true log4jdbc.dump.sql.delete default value is true log4jdbc.dump.sql.create default value is true The default values for all of these are true, but they can be selectively turned on and off to filter out unwanted types of sql statements. For example, setting log4jdbc.dump.sql.delete will cause all DELETE sql commands to not be logged. o A new option to add a semi colon to the end of the dumped sql: log4jdbc.dump.sql.addsemicolon default value is false Sometimes it's useful to use log4jdbc to produce sql scripts that can later be fed back into a SQL tool to execute against a database and this option can help to produce more re-useable sql output script data from a log file. o added Microsoft SQL Server 2005 Driver (com.microsoft.sqlserver.jdbc.SQLServerDriver) to list of "well known" drivers that log4jdbc looks for at startup. (thanks to Rob Richards for pointing this out) Note that the SQL Server 2000 Driver with the confusing name of (com.microsoft.jdbc.sqlserver.SQLServerDriver) is also still supported. o other miscellaneous improvements.
2008-11-08 1.2 alpha 1 Release o added a new logger "jdbc.connection" to dump connection open and close events as well as dumping all open connection numbers. This is very useful for hunting down connection leak problems. o several new options to produce better SQL output: log4jdbc.dump.booleanastruefalse - many RDBMS's don't have a native boolean type and store booleans as a 1 or 0. Setting this option to false will show boolean bind variables as 1 or 0. Setting this to true will show the boolean as true or false. (Note that the default for this setting is false, contrary to the previous way log4jdbc worked.) log4jdbc.dump.sql.maxlinelength - can be used to insert line breaks into long running SQL (at white space positions.) previous versions of log4jdbc did this automatically with a value of 90 (the default value is 90.) This line breaking can be turned off completely by setting this to 0. log4jdbc.dump.fulldebugstacktrace - can be used in extreme debugging circumstances when you want to be able to see the full stack trace in the debug output. Be extra careful when using this as it will obviously produce much much more logging output. o dump a null bind variable as NULL instead of <null> for more accurate and reuseable SQL output. o several new options for controlling what types of SQL statements are logged: log4jdbc.dump.sql.select default value is true log4jdbc.dump.sql.insert default value is true log4jdbc.dump.sql.update default value is true log4jdbc.dump.sql.delete default value is true log4jdbc.dump.sql.create default value is true The default values for all of these are true, but they can be selectively turned on and off to filter out unwanted types of sql statements. For example, setting log4jdbc.dump.sql.delete will cause all DELETE sql commands to not be logged. o A new option to add a semi colon to the end of the dumped sql: log4jdbc.dump.sql.addsemicolon default value is false Sometimes it's useful to use log4jdbc to produce sql scripts that can later be fed back into a SQL tool to execute against a database and this option can help to produce more re-useable sql output script data from a log file. o added Microsoft SQL Server 2005 Driver (com.microsoft.sqlserver.jdbc.SQLServerDriver) to list of "well known" drivers that log4jdbc looks for at startup. (thanks to Rob Richards for pointing this out) Note that the SQL Server 2000 Driver with the confusing name of (com.microsoft.jdbc.sqlserver.SQLServerDriver) is also still supported. o other miscellaneous improvements.
2008-11-08 1.2 alpha 1 Release o added a new logger "jdbc.connection" to dump connection open and close events as well as dumping all open connection numbers. This is very useful for hunting down connection leak problems. o several new options to produce better SQL output: log4jdbc.dump.booleanastruefalse - many RDBMS's don't have a native boolean type and store booleans as a 1 or 0. Setting this option to false will show boolean bind variables as 1 or 0. Setting this to true will show the boolean as true or false. (Note that the default for this setting is false, contrary to the previous way log4jdbc worked.) log4jdbc.dump.sql.maxlinelength - can be used to insert line breaks into long running SQL (at white space positions.) previous versions of log4jdbc did this automatically with a value of 90 (the default value is 90.) This line breaking can be turned off completely by setting this to 0. log4jdbc.dump.fulldebugstacktrace - can be used in extreme debugging circumstances when you want to be able to see the full stack trace in the debug output. Be extra careful when using this as it will obviously produce much much more logging output. o dump a null bind variable as NULL instead of <null> for more accurate and reuseable SQL output. o several new options for controlling what types of SQL statements are logged: log4jdbc.dump.sql.select default value is true log4jdbc.dump.sql.insert default value is true log4jdbc.dump.sql.update default value is true log4jdbc.dump.sql.delete default value is true log4jdbc.dump.sql.create default value is true The default values for all of these are true, but they can be selectively turned on and off to filter out unwanted types of sql statements. For example, setting log4jdbc.dump.sql.delete will cause all DELETE sql commands to not be logged. o A new option to add a semi colon to the end of the dumped sql: log4jdbc.dump.sql.addsemicolon default value is false Sometimes it's useful to use log4jdbc to produce sql scripts that can later be fed back into a SQL tool to execute against a database and this option can help to produce more re-useable sql output script data from a log file. o added Microsoft SQL Server 2005 Driver (com.microsoft.sqlserver.jdbc.SQLServerDriver) to list of "well known" drivers that log4jdbc looks for at startup. (thanks to Rob Richards for pointing this out) Note that the SQL Server 2000 Driver with the confusing name of (com.microsoft.jdbc.sqlserver.SQLServerDriver) is also still supported. o other miscellaneous improvements.
2008-04-11 1.1 Release o upgrade to SLF4J 1.5. Note that log4jdbc should still work with any older (or newer) version of SLF4J too. o slightly better fault tolerance for when loading/probing of popular JDBC drivers fails for any reason.
2008-04-11 1.1 Release o upgrade to SLF4J 1.5. Note that log4jdbc should still work with any older (or newer) version of SLF4J too. o slightly better fault tolerance for when loading/probing of popular JDBC drivers fails for any reason.
Be the first person to add a text review.
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?
Thanks for your review!
Get credit for your review by logging in via OpenID. Click your account provider: