106 Commits

Author SHA1 Message Date
Luke Street 93d265316f Use src-jdbc41 for Maven build; fix warnings
Support byte array dumping in JDBC 4.1 PreparedStatement
2016-11-23 10:31:16 -05:00
Luke Street 2ab2d0389e Merge remote-tracking branch 'prs/add_jdbc_4_1' 2016-11-23 10:07:14 -05:00
Luke Street f4f264f921 Merge remote-tracking branch 'prs/add_pom' 2016-11-23 10:07:02 -05:00
LEGROS 3604fe043c Byte arrays are now dumped 2016-06-23 09:49:01 +02:00
Pascal Schumacher 6a9b4e1948 add minimal pom.xml 2016-06-14 21:46:40 +02:00
Pascal Schumacher bff4f67db8 quick hack to begin jdbc 4.1 compatible implementation 2016-06-14 21:14:57 +02:00
Arthur Blake dc6edbdb86 Merge pull request #74 from jadetang/master
make RdbmsSpecifics public
2015-10-15 11:36:22 -04:00
唐思成 f637d041cc make RdbmsSpecifics public 2015-10-13 09:56:51 +08:00
Arthur Blake 7d51cd3d3f add extra blank line
add extra blank line - no functional changes
2015-09-30 13:06:14 -04:00
Arthur Blake 77507faf9c add new option, "log4jdbc.trim.sql.lines"
Unforunately, got mixed up with a partial code reformat.
Too lazy to go back and do that part as a separate commit
2015-09-30 12:30:16 -04:00
Arthur Blake 8918e4a39a remove JDBC 3 versions
JDBC 3 version no longer needed going forward
2015-09-30 12:25:14 -04:00
Arthur Blake d308e26494 add note about downloads 2015-03-30 09:22:37 -04:00
Arthur Blake 053afdbf0f Temporary README 2015-03-30 09:05:58 -04:00
ablake d3c58ab5cd add .hgignore file to hide common project/editor artifacts, etc. from mercurial 2014-11-26 08:24:18 -05:00
ablake 35b5548e2f update copyright date, no functional changes 2014-11-26 08:20:25 -05:00
convert-repo ab522b45e2 update tags 2013-03-19 20:17:26 +00:00
arthur blake 1f47f9a899 Issue 61; correct getArray method logging label (was incorrectly set to "getURL", a likely cut & paste error) 2012-12-27 13:45:43 +00:00
arthur blake f7a51cd827 oops.. tabs to spaces 2012-09-27 21:42:56 +00:00
arthur blake e261132179 bug fix ResultSetSpy.getStatement should return wrapped Statement, not real Statement (Issue 55) 2012-09-27 21:39:50 +00:00
arthur blake ee5468cfe6 prepare for release 2012-02-17 23:01:18 +00:00
arthur blake 88f90f8131 update copyright notice for 2012 2012-02-17 22:57:44 +00:00
arthur.blake 7f7d2f0f3b update build scripts to use latest 1.6 jdk and ant releases 2012-02-16 22:31:04 +00:00
arthur blake d430b481a4 escape single quotes in PreparedStatement/CallableStatement bind variables (Issue 36.) 2011-06-22 18:31:24 +00:00
arthur blake 48154128a9 process SQL consistently when the sql is dumped because an exception occurred 2011-06-22 18:28:57 +00:00
arthur blake dbc63df301 bump versions of jdk used for javadoc src with ydoc.3 and ydoc.4 targets 2011-06-20 13:09:42 +00:00
arthur blake 59ecc4ac8b new SQL formatter to more reliably dump sql that can be run for MySql (Issue 34) 2011-06-20 13:06:42 +00:00
arthur blake d10afb244f don't show debug info in sql timing dump unless debug is enabled on the logger (to make the sql timing dump consistent with the way other the loggers work) 2011-06-20 12:54:31 +00:00
arthur blake c183dc2b5d update copyright for 2011 2011-03-02 14:09:21 +00:00
arthur blake a3ac1c68c1 modify scripts to prepare for 1.2 release 2011-03-02 14:04:58 +00:00
arthur blake 46c13d8498 add new option, log4jdbc.trim.sql.extrablanklines for removing extra blank lines from sql output 2011-03-02 14:03:48 +00:00
arthur blake 6906f31ba5 fixed Issue 33:ResultSet.getStatement creates new Connection 2011-01-08 03:20:23 +00:00
arthur.blake d3a48845f3 Issue 29; performance improvement 2010-09-08 01:59:00 +00:00
arthur.blake 7355247886 finalize release date for next beta release in CHANGES file
update copyright date in license file
2010-06-10 00:16:40 +00:00
arthur.blake 00369eba9f fix possible null pointer issue with setBlob and setClob (Issue 21) 2010-06-07 14:04:34 +00:00
arthur.blake a02f682e7c fix; Timestamp check has to be done first because Timestamp extends Date 2010-05-28 01:03:49 +00:00
arthur.blake a5290edf4b Issue 14; add support for the newer oracle.jdbc.OracleDriver driver (the older oracle.jdbc.driver.OracleDriver driver is still supported as well.) 2010-05-28 00:37:22 +00:00
arthur.blake 9769dbc6dd add new option, log4jdbc.suppress.generated.keys.exception for ColdFusion 2010-05-27 23:49:12 +00:00
arthur.blake b0b69fdc64 add new option, log4jdbc.trim.sql to trim the SQL before logging it (previously the sql was always trimmed) 2010-05-24 11:07:46 +00:00
arthur.blake 1dd40a2f76 Issue 18; Fix non-threadsafe usage of SimpleDateFormat 2010-05-15 18:24:24 +00:00
arthur.blake bbf255e0b4 look first for log4jdbc property settings in optional log4jdbc.properties in the classpath 2010-05-12 13:17:28 +00:00
arthur.blake 4ee6d5f745 upgrade from slf4j 1.5.0 to 1.6.0 2010-05-11 15:54:39 +00:00
arthur.blake c83e89c194 bump version numbers for upcoming 1.2 beta 2 release 2010-05-10 20:31:46 +00:00
arthur.blake 5ac146eb77 add system property log4jdbc.auto.load.popular.drivers for disabling auto-loading of drivers 2010-05-10 20:30:48 +00:00
arthur.blake cab8caa20a don't build tar.gz file in release target, and use consistent jdk in javadoc.cmd 2010-03-21 02:26:36 +00:00
arthur.blake 6484ab0c10 update CHANGES for 1.2beta1 release date 2010-03-21 02:05:39 +00:00
arthur.blake de7d4acc84 update changes list 2010-03-20 02:47:30 +00:00
arthur.blake 108d89b8bc update copyright 2010-03-20 02:30:32 +00:00
arthur.blake 076a585184 bump version number to 1.2beta1 2010-03-20 01:56:36 +00:00
arthur.blake 1d455b77e6 better handling of dates (don't drop time portion of Date object!!) and use to_date function for Oracle (Issue 14) 2010-03-20 01:53:49 +00:00
arthur.blake e33eb5534f Issue 11; actually use the log4jdbc.dump.sql.maxlinelength parameter! 2009-12-02 19:59:48 +00:00
arthur.blake 15a798c27a performance improvement 2009-12-02 19:29:17 +00:00
arthur.blake e227d3ca26 convert tabs to spaces 2009-12-02 19:28:05 +00:00
arthur.blake 98f98d605c update JDK versions 2009-12-01 23:15:20 +00:00
arthur.blake c19443a574 Issue 8, Issue 9: use better date and timestamp formatting for all database types 2009-12-01 23:14:02 +00:00
arthur.blake de256617a2 check for exception when formatting parameter objects 2009-08-08 19:05:17 +00:00
arthur.blake eac61725f6 bump version number for 1.2 alpha 3 release 2009-08-08 19:02:49 +00:00
arthur.blake f7fa0cdaf4 minor javadoc correction 2009-03-13 02:58:17 +00:00
arthur.blake 2223543ff0 remove obsolete documentation and add release date to CHANGES 2009-02-27 02:58:26 +00:00
arthur.blake 89ed31f0b8 update copyright in comments 2009-02-27 02:52:19 +00:00
arthur.blake 29b2b01ee1 fix (Issue 1) bug with batched SQL in Statements and add log4jdbc.statement.warn option 2009-02-27 02:39:54 +00:00
arthur.blake 0a4f5267df update java build environment, increment build version number and some minor code cleanup (no functional changes) 2009-02-26 02:46:34 +00:00
arthur.blake a7ebd7eb1f add getter methods across the board for the real wrapped object 2009-02-26 02:24:08 +00:00
arthur_blake 48cb541e58 update 1.6 JDK, increase amount of memory for 1.6 javadoc, and fix outdated javadoc 2008-11-08 22:30:50 +00:00
arthur_blake 201d3b974b update doc in preparation for 1.2 alpha 1 release 2008-11-08 22:01:57 +00:00
arthur_blake 007ff20ed1 initial features and improvements for 1.2 version 2008-09-20 02:52:00 +00:00
arthur_blake 2d8cbd4cdf update copyright message in headers 2008-04-12 02:51:44 +00:00
arthur_blake 21cbf688ec update/add copyright notice in build script and javadoc 2008-04-12 02:42:42 +00:00
arthur_blake 44043261af upgrade to slf4j 1.5.0 2008-04-12 02:38:26 +00:00
arthur_blake 86364a24fa update changes and web site to reflect 1.1 release 2008-04-12 02:37:44 +00:00
arthur_blake 4900e751bb upgrade to slf4j 1.5.0 2008-04-12 02:25:44 +00:00
arthur_blake 9da5241e39 remove beta designation from version number and fix scripts 2008-03-12 21:46:14 +00:00
arthur_blake ddbee4d1b6 add TODO entry about maven2 support 2008-03-12 21:45:31 +00:00
arthur_blake 6bf61ef02b minor bug fix; mark drivers as not found if they fail to load for ANY reason 2008-03-12 21:44:22 +00:00
arthur_blake 18c7e2fd19 minor javadoc generation fix 2007-11-11 01:13:47 +00:00
arthur_blake 339682f0c9 update news release link for 1.1 beta 1 release 2007-11-10 23:49:08 +00:00
arthur_blake b9ac53c3f3 update web site and documentation in preparation for 1.1 beta 1 release 2007-11-10 02:15:11 +00:00
arthur_blake 1695b42ce1 upgrade from slf4j 1.4.2 to 1.4.3 2007-11-10 02:12:00 +00:00
arthur_blake a072c4e953 added new debugging options log4jdbc.sqltiming.warn.threshold and log4jdbc.sqltiming.error.threshold (system property settings) 2007-11-09 03:48:42 +00:00
arthur_blake 567cefd156 added HSQLDB (org.hsqldb.jdbcDriver) and H2 (org.h2.Driver) to list of "well known" drivers that log4jdbc looks for at startup, prepare for 1.1 beta 1 release and correct scripts 2007-11-08 23:38:29 +00:00
arthur_blake 90608d8ff1 documentation changes for 1.1 alpha 2 release 2007-07-26 00:05:28 +00:00
arthur_blake 425148e118 change scripts to support dual javadoc generation for JDBC 3/jdk 1.4 and JDBC 4/jdk 1.6 versions of log4jdbc 2007-07-25 23:27:42 +00:00
arthur_blake 328a6da56f upgrade from slf4j 1.4.0 to slf4j 1.4.2 2007-07-25 23:00:30 +00:00
arthur_blake 8c6125a59c windows script to build both the jdbc3 and jdbc4 versions of log4jdbc 2007-07-24 22:01:49 +00:00
arthur_blake 8ab139da54 include mySql and postgresSql as "well-known" jdbc drivers that log4jdbc looks for at startup 2007-07-24 21:56:49 +00:00
arthur_blake 41064c0bc4 initial JDBC 4 support and some minor bug fixes. 2007-07-24 21:47:11 +00:00
arthur_blake 2ca89b4f6e branch src for jdbc3 and jdbc4 - both branches will be maintained in the same project tree 2007-07-24 21:09:14 +00:00
arthur_blake 2a9d6066a3 Deleted no longer needed libraries. 2007-05-30 03:03:20 +00:00
arthur_blake 6c83eba2ce update link for 1.1 alpha 1 news 2007-05-30 02:31:27 +00:00
arthur_blake c051b6fd1d add a release target to make things easier when release time rolls around 2007-05-30 02:17:06 +00:00
arthur_blake a3b1bf73d0 scripts to invoke the PostLogProfilerProcessor tool 2007-05-30 01:28:03 +00:00
arthur_blake 904fab365a documentation for 1.1 alpha 1 release 2007-05-30 01:26:14 +00:00
arthur_blake b4217f92f0 update to slf4j 1.4.0 2007-05-30 01:17:20 +00:00
arthur_blake a44c5fb045 change javadoc references from log4j, to slf4j 2007-05-30 00:33:12 +00:00
arthur_blake a11ea79c4f implement isJdbcLoggingEnabled correctly, and other minor fixes 2007-05-30 00:32:12 +00:00
arthur_blake 18fcaa4ddd this file is obsolete because logging works through SLF4J now (Slf4jSpyLogDelegator replaces this file) 2007-05-29 22:09:17 +00:00
arthur_blake 6bbd8c79be advertisement for yourkit profiler in exchange for open source license 2007-05-29 17:32:10 +00:00
arthur_blake e1555464ed make exception logging more uniform with debug logging when debug level is on for sql and sqltiming logging 2007-05-28 22:40:17 +00:00
arthur_blake 317f0b1334 PostLogProfilerProcessor needs to be able to handle exceptions in log, & needs to be more efficient 2007-05-28 21:21:54 +00:00
arthur_blake 667d5d6f2d add license header 2007-05-28 21:18:25 +00:00
arthur_blake b7c95c912a add simple command line program (PostLogProfilerProcessor) for processing sqltiming log files to create a simple profiling report from log data 2007-05-28 21:17:54 +00:00
arthur_blake f481af8396 handle batched sql correctly 2007-05-28 21:14:19 +00:00
arthur_blake b92cd4f844 change build version to 1.1alpha1 2007-05-28 21:11:02 +00:00
arthur_blake 0f12fec9d4 initial 1.1 features, SLF4J instead of log4j, some bug fixes (see CHANGES) 2007-05-22 21:47:09 +00:00
arthur_blake 366cdf9383 add CHANGES and TODO files 2007-05-18 02:22:03 +00:00
arthur_blake 0f602d3040 increment release version to 1.01 for next pending release 2007-05-18 02:14:12 +00:00
arthur_blake 79e7d62d51 bug fix; make sure that sqlTimingLogger is included in the set of loggers that can turn on log4jdbc tracing 2007-05-18 02:12:38 +00:00
58 changed files with 20623 additions and 7181 deletions
+3
View File
@@ -0,0 +1,3 @@
^bin$
^.project$
^.classpath$
+8
View File
@@ -0,0 +1,8 @@
# log4jdbc
A more extensive README will be created soon. For now, you can view the usage instructions at the old Google Code hosting site:
https://code.google.com/p/log4jdbc/
You can download the prebuilt jars at:
https://code.google.com/p/log4jdbc/downloads/list
Executable
+209
View File
@@ -0,0 +1,209 @@
2015-09-30 1.3 release
o add new option, "log4jdbc.trim.sql.lines" which when set,
will trim SQL line by line (for beginning of line, only trimming
consistent white space) If this option is selected, the TrimSql
option will be ignored.
o remove JDBC 3 version (not all scripts updated yet.)
o getArray method improperly labeled as getURL (Issue 61.)
o bug fix ResultSetSpy.getStatement should return wrapped Statement,
not real Statement (Issue 55.)
o move to GitHub (Google Code shutting down.)
2012-02-17 1.2 Release
o escape single quotes in PreparedStatement/CallableStatement bind variables (Issue 36.)
o process SQL consistently when the sql is dumped because an exception occurred.
o new SQL formatter to more reliably dump sql that can be run for MySql (Issue 34.)
o don't show debug info in sql timing dump unless debug is enabled on the logger
(to make the sql timing dump consistent with the way other the loggers work)
o add new option, log4jdbc.trim.sql.extrablanklines for removing
extra blank lines from sql output.
o fix issue where extra connection was being created when
ResultSet.getStatement was being called (Issue 33.)
o performance enhancement when logging not enabled (Issue 29.)
2010-06-09 1.2 beta 2 Release
o add new option, log4jdbc.auto.load.popular.drivers for
disabling auto-loading of drivers
o look first for log4jdbc property settings in optional
log4jdbc.properties file in the classpath.
o Fix non-threadsafe usage of SimpleDateFormat (Issue 18)
o add new option, log4jdbc.trim.sql to trim the SQL before logging
it.
o add new option, log4jdbc.suppress.generated.keys.exception that
will ignore any exception produced by the method,
Statement.getGeneratedKeys(). This flag is useful in Coldfusion
environments which typically call this method after every update,
even if unwarranted, and ignoring the exception, thus clogging up
the logs with these exception reports.
o add support for the newer oracle.jdbc.OracleDriver driver (the
older oracle.jdbc.driver.OracleDriver driver is still supported
as well) and add corrected date formatting for Oracle.
o fix possible null pointer issue with setBlob and setClob (Issue 21)
2010-03-20 1.2 beta 1 Release
o Check for exception that should not, but in some cases could
occur when trying to format parameter arguments.
o Use only one type of date format so that time portion of Date
types is not dropped!
o use to_date function for Oracle (Issue 14)
o performance improvements
o fix: respect DumpSqlMaxLineLength option.
o various other fixes (including Issues 8 and 9)
2009-02-26 1.2 alpha 2 Release
o (Issue 1) fix bug where batch of logged SQL wasn't cleared
properly when using batched SQL.
o Added log4jdbc.statement.warn system property; defaults to false.
This is a new option to control the SQL Statement warnings in the
log. When Statement objects are used by the application, the SQL
in the log is preceded by "{WARNING: Statement used to run SQL}"
This was always on in previous releases. Now it
is off by default, and can be turned on by setting this property.
o (Issue 2) add getter methods across the board for the real
wrapped object.
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.
2007-11-10 1.1 beta 1 Release
o added HSQLDB (org.hsqldb.jdbcDriver) and H2 (org.h2.Driver) to
list of "well known" drivers that log4jdbc looks for at startup.
o added log4jdbc.sqltiming.warn.threshold and
log4jdbc.sqltiming.error.threshold system property settings to
greatly aid in finding slow running sql. Special thanks to
Lilianne E. Blaze for the idea and initial implementation.
2007-07-25 1.1 alpha 2 Release
o JDBC 4.0 support!
o fix Null pointer exception bug that could happen with setObject
call on PreparedStatementSpy
o added MySQL (com.mysql.jdbc.Driver) and PostgreSQL
(org.postgresql.Driver) to list of "well known" drivers that
log4jdbc looks for at startup.
2007-05-29 1.1 alpha 1 Release
o Fixed problem where when sql timing log was the only log turned
on, log4jdbc would not recognize that logging was on at all.
o report sql exceptions in the sql timing log as well (when they
occured during sql execution) and prominently show that the sql
FAILED, and display how long it tried to chug on the sql before
the exception was thrown.
o Switch to Simple Logging Facade for Java SLF4J instead of using
log4j directly, so that any underlying logging system can be
easily used.
o option added to ant build script to generate javadoc with ydoc
to include UML diagrams within the javadoc.
o dump batched sql correctly.
o add simple command line program (PostLogProfilerProcessor) for
processing sqltiming log files to create a simple profiling
report from log data.
2007-04-21 Initial 1.0 Release
+1 -1
View File
@@ -1,6 +1,6 @@
log4jdbc is open source software, released under the Apache License, Version 2.0:
Copyright 2007 Arthur Blake
Copyright 2007-2011 Arthur Blake
Licensed under the Apache License, Version 2.0 (the "License");
you may not use log4jdbc except in compliance with the License.
+1 -130
View File
@@ -1,132 +1,3 @@
[this software is open source, released under the Apache License, Version 2.0: see LICENSE file]
log4jdbc Version 1.0
Release Date: 2007-04-21
=========================
log4jdbc is a JDBC driver that can log SQL and/or JDBC calls (and optionally SQL timing information)
for other jdbc drivers using the log4j 1.2.x logging system.
Features:
=========
* Easy to drop in and use in existing systems, because it's a standard jdbc driver.
The only other requirement is to have the log4j 1.2.x jar and your jdbc driver for your
database.
* Easy to configure, in most cases all you need to do is change the driver class name
and prepend "jdbc:log4" to your existing jdbc url, set up your log4j categories and
you're ready to go!
* In the logged output, for prepared statements, the bind arguments are automatically
inserted into the SQL output. This greatly Improves readability and debugging for
many cases.
* SQL timing information can be generated to help identify how long SQL statements take
to run, helping to identify statements that are running too slowly.
* SQL connection number information is generated to help identify connection pooling or
threading problems.
* Works with any JDBC 3.0 driver, JDK 1.4 and above, and log4j 1.2.x.
This jdbc driver can be "dropped in" to log the SQL and jdbc calls of another JDBC driver.
Usage:
======
1. Set your jdbc driver class to net.sf.log4jdbc.DriverSpy
The underlying driver that is being spied on in many cases will be loaded automatically
without any additional configuration.
The log4jdbc "spy" driver will try and load the following popular jdbc drivers:
oracle.jdbc.driver.OracleDriver (oracle)
com.sybase.jdbc2.jdbc.SybDriver (sybase)
net.sourceforge.jtds.jdbc.Driver (sourceforge ms sql server driver)
com.microsoft.jdbc.sqlserver.SQLServerDriver (microsoft ms sql server driver)
weblogic.jdbc.sqlserver.SQLServerDriver (weblogic ms sql server driver)
com.informix.jdbc.IfxDriver (informix)
org.apache.derby.jdbc.ClientDriver (apache derby client/server driver)
org.apache.derby.jdbc.EmbeddedDriver (apache derby embedded driver)
If you want to use a different underlying jdbc driver that is not already in the above supported list,
set a system property, log4jdbc.drivers to the class name of the additional driver. This
can also be a comma separated list of driver class names.
(optional) -Dlog4jdbc.drivers=<driver>[,<driver>...] If your driver is not one of the common preloaded drivers.
2. Prepend "jdbc:log4" to the normal jdbc url that you are using.
For example, if your normal jdbc url is "jdbc:derby://localhost:1527//db-derby-10.2.2.0-bin/databases/MyDatabase"
You would change it to: "jdbc:log4jdbc:derby://localhost:1527//db-derby-10.2.2.0-bin/databases/MyDatabase" to use the
log4jdbc spy driver.
3. Make sure log4jdbc-1.0.jar and the log4j jar (v1.2x) are in the classpath, as well as the jar file(s) for the
actual jdbc driver that is being spied upon.
Use the following command line options to initialize log4j:
(optional) -Dlog4j.debug
-Dlog4j.configuration=log4j.xml (make sure that log4j.xml is also in the classpath).
or alternatively initialize the log4j system in code.
5. Set up your log4j logging categories. There are 4 categories that are used by log4jdbc,
If all 4 loggers are set to the FATAL level, then log4jdbc will not log anything, and in fact the actual (real)
connection to the underlying database will be returned by the driver (thus allowing log4jdbc to be installed and
available without imposing any performance loss). If any of the 4 logs are set to ERROR or higher, then log4jdbc
will be activated, wrapping and logging all activity in the jdbc connections returned by the driver.
Each of these logs can be set at either DEBUG, INFO or ERROR
DEBUG includes the class name and line number (if available) at which the sql was executed.
INFO includes the sql (or other information as applicable)
ERROR will show the stack traces in the log output when sql exceptions occur.
jdbc.sqlonly shows only SQL in the log. SQL executed within a prepared statement is automatically shown with
it's bind arguments replaced with the data bound at that position, for greatly increased readability.
jdbc.sqltiming shows the SQL, post-execution, including timing statistics on how long the sql took to execute.
jdbc.audit Logs ALL jdbc calls except for ResultSets. This is a very voluminous output, and is not normally
needed unless tracking down a specific jdbc problem.
jdbc.resultset Even more voluminous, because all calls to ResultSet objects are logged.
Additionally, there is one logger named log4jdbc.debug which is for use with internal debugging of log4jdbc.
At this time it just prints out information on which underlying drivers were found and not found when the
spy driver loads.
In a typical usage scenario, you might turn on only the jdbc.sqlonly logging at INFO level,
just to view the sql coming out of your program.
Then if you wanted to view how long each sql statement is taking to execute, you might use jdbc.sqltiming.
jdbc.audit and jdbc.resultset are used for more in depth diagnosis of what is going on under the hood with jdbc
as potentially almost every single call to jdbc could be logged (logs can grow very large very quickly with this.)
See the sample files log4j.xml and log4j.properties for more information.
6. Adjust debugging options. When logging at the DEBUG level, the class file and line number (if available) for the
class that invoked jdbc is logged after each log statement. This is enormously useful for finding where in the
code the SQL is generated. Be careful when using this on a production system because there is a small, but
potentially significant penalty performance for generating this data on each logging statement.
In many cases, this call stack data is not very useful because the calling class into log4jdbc is a connection pool,
object-persistance layer or other layer between log4jdbc and your application code-- but the class file and
line number information you really are interested in seeing is where in your application the SQL was generated from.
There are a couple of very useful system properties you can set for log4jdc to help get around this problem.
(optional) -Dlog4jdbc.debug.stack.prefix=<package.prefix> <-- a String that is the partial (or full) package
prefix for the package name of your application. The call stack will be searched down to the first occurence
of a class that has the matching prefix. If this is not set, the actual class that called into log4jdbc is used
in the debug output (in many cases this will be a connection pool class)
Please see the main log4jdbc web page at http://log4jdbc.googlecode.com for detailed features and usage information.
Executable
+22
View File
@@ -0,0 +1,22 @@
o what about jdbc 2 back support??
o configuration that doesn't rely on system properties (jdbc parms?)
o PostLogProfilerProcessor needs to be able to handle exceptions in log, & needs to be more efficient, also needs command
line switches to control the thresholds & counts, etc.
o intelligent array dumper?
o check for more different kinds of JDBC drivers at startup time
o support for data sources
o ALL String concatenation & dumping methods should take place ONLY if logging is ON!!
o review dumpedSql method - make auto line breaking option (& num chars used) be options
o need log4jdbc.debug.stack.regex so that the stack matching can take place via regex
o maven2 repository support
o this may be a better solution to SimpleDateFormat contention issue: http://www.javaspecialists.eu/archive/Issue172.html
-212
View File
@@ -1,212 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<title>log4jdbc - A JDBC Driver for logging SQL and JDBC calls.</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="reset-fonts-grids.css" />
<link rel="stylesheet" href="log4jdbc.css" />
</head>
<body>
<h1><a name="top"/><img class="logo" src="log4jdbc-logo-gray.png"><br>
<a href="http://sourceforge.net/project/showfiles.php?group_id=194500&package_id=229335&release_id=502834">download</a> |
<a href="#news">news</a> |
<a href="#features">features</a> |
<a href="#usage">usage</a> |
<a href="apidocs/net/sf/log4jdbc/package-summary.html">javadoc</a> |
<a href="#license">license</a> |
<a href="#feedback">feedback</a>
</h1>
<p>
<b>log4jdbc</b> is a JDBC driver that can log SQL and/or JDBC calls (and optionally SQL timing information)
for other jdbc drivers using the <a href="http://logging.apache.org/log4j/docs/">log4j</a> 1.2.x logging system.
</p>
<h2><a name="news"/>news</h2>
<p class="left"><b>2007-04-21:</b> log4jdbc 1.0 has been released! <a href="http://sourceforge.net/project/showfiles.php?group_id=194500&package_id=229335&release_id=502834">Download it</a> and give it a try!</p>
<p class="right"><a href="#top">[back to top]</a></p>
<h2><a name="features"/>features</h2>
<ul class="left">
<li>
Easy to drop in and use in existing systems, because it's a standard jdbc driver.
The only other requirement is to have the log4j 1.2.x jar and your jdbc driver for your
database.
</li>
<li>
Easy to configure, in most cases all you need to do is change the driver class name
and prepend "jdbc:log4" to your existing jdbc url, set up your log4j categories and
you're ready to go!
</li>
<li>
In the logged output, for prepared statements, the bind arguments are automatically
inserted into the SQL output. This greatly Improves readability and debugging for
many cases.
</li>
<li>
SQL timing information can be generated to help identify how long SQL statements take
to run, helping to identify statements that are running too slowly.
</li>
<li>
SQL connection number information is generated to help identify connection pooling or
threading problems.
</li>
<li>
Works with any JDBC 3.0 driver, JDK 1.4 and above, and log4j 1.2.x.
</li>
</ul>
<p>
This jdbc driver can be "dropped in" to log the SQL and jdbc calls of another JDBC driver.
</p>
<p class="right"><a href="#top">[back to top]</a></p>
<h2><a name="usage"/>usage</h2>
<ol class="left">
<li><p> Set your jdbc driver class to <code>net.sf.log4jdbc.DriverSpy</code> </p>
<p>
The underlying driver that is being spied on in many cases will be loaded automatically
without any additional configuration.
</p>
<p>
The log4jdbc "spy" driver will try and load the following popular jdbc drivers:
</p>
<pre>
oracle.jdbc.driver.OracleDriver (oracle)
com.sybase.jdbc2.jdbc.SybDriver (sybase)
net.sourceforge.jtds.jdbc.Driver (sourceforge ms sql server driver)
com.microsoft.jdbc.sqlserver.SQLServerDriver (microsoft ms sql server driver)
weblogic.jdbc.sqlserver.SQLServerDriver (weblogic ms sql server driver)
com.informix.jdbc.IfxDriver (informix)
org.apache.derby.jdbc.ClientDriver (apache derby client/server driver)
org.apache.derby.jdbc.EmbeddedDriver (apache derby embedded driver)
</pre>
<p>
If you want to use a different underlying jdbc driver that is not already in the above supported list,
set a system property, log4jdbc.drivers to the class name of the additional driver. This
can also be a comma separated list of driver class names.
</p>
<p>
(optional) <code>-Dlog4jdbc.drivers=&lt;driver&gt;[,&lt;driver&gt;...]</code> If your driver is not one of the common preloaded drivers.
</p>
</li>
<li><p> Prepend <code>jdbc:log4</code> to the normal jdbc url that you are using.</p>
<p>For example, if your normal jdbc url is <code>jdbc:derby://localhost:1527//db-derby-10.2.2.0-bin/databases/MyDatabase</code>
You would change it to: <code>jdbc:log4jdbc:derby://localhost:1527//db-derby-10.2.2.0-bin/databases/MyDatabase</code> to use the
log4jdbc spy driver.</p>
</li>
<li><p>Make sure <span class="file">log4jdbc-1.0.jar</span> and the <span class="file">log4j jar</span> (v1.2x) are in
the classpath, as well as the jar file(s) for the actual jdbc driver that is being spied upon.</p>
<p>
Use the following command line options to initialize log4j:
</p>
<pre>
(optional) -Dlog4j.debug
-Dlog4j.configuration=log4j.xml (make sure that log4j.xml is also in the classpath).
</pre>
<p>or alternatively initialize the log4j system in code. </p>
</li>
<li> <p> Set up your log4j logging categories. There are 4 categories that are used by log4jdbc,
If all 4 loggers are set to the FATAL level, then log4jdbc will not log anything, and in fact the actual (real)
connection to the underlying database will be returned by the driver (thus allowing log4jdbc to be installed and
available without imposing any performance loss). If any of the 4 logs are set to ERROR or higher, then log4jdbc
will be activated, wrapping and logging all activity in the jdbc connections returned by the driver.</p>
<pre>
Each of these logs can be set at either DEBUG, INFO or ERROR
DEBUG includes the class name and line number (if available) at which the sql was executed.
INFO includes the sql (or other information as applicable)
ERROR will show the stack traces in the log output when sql exceptions occur.
jdbc.sqlonly shows only SQL in the log. SQL executed within a prepared statement is automatically shown with
it's bind arguments replaced with the data bound at that position, for greatly increased readability.
jdbc.sqltiming shows the SQL, post-execution, including timing statistics on how long the sql took to execute.
jdbc.audit Logs ALL jdbc calls except for ResultSets. This is a very voluminous output, and is not normally
needed unless tracking down a specific jdbc problem.
jdbc.resultset Even more voluminous, because all calls to ResultSet objects are logged.
</pre>
<p>Additionally, there is one logger named log4jdbc.debug which is for use with internal debugging of log4jdbc.
At this time it just prints out information on which underlying drivers were found and not found when the
spy driver loads.</p>
<p>In a typical usage scenario, you might turn on only the jdbc.sqlonly logging at INFO level,
just to view the sql coming out of your program.</p>
<p>Then if you wanted to view how long each sql statement is taking to execute, you might use jdbc.sqltiming.</p>
<p>jdbc.audit and jdbc.resultset are used for more in depth diagnosis of what is going on under the hood with jdbc
as potentially almost every single call to jdbc could be logged (logs can grow very large very quickly with this.)</p>
<p>See the sample files <a href="log4j.xml">log4j.xml</a> and <a href="log4j.properties">log4j.properties</a> for more information.</p>
</li>
<li><p>Adjust debugging options. When logging at the DEBUG level, the class file and line number (if available) for the
class that invoked jdbc is logged after each log statement. This is enormously useful for finding where in the
code the SQL is generated. Be careful when using this on a production system because there is a small, but
potentially significant penalty performance for generating this data on each logging statement.</p>
<p>In many cases, this call stack data is not very useful because the calling class into log4jdbc is a connection pool,
object-persistance layer or other layer between log4jdbc and your application code-- but the class file and
line number information you really are interested in seeing is where in your application the SQL was generated from.</p>
<p>There are a couple of very useful system properties you can set for log4jdc to help get around this problem.</p>
<p>
(optional) <code>-Dlog4jdbc.debug.stack.prefix=&lt;package.prefix&gt;</code> a String that is the partial (or full) package
prefix for the package name of your application. The call stack will be searched down to the first occurence
of a class that has the matching prefix. If this is not set, the actual class that called into log4jdbc is used
in the debug output (in many cases this will be a connection pool class)</p>
</li>
</ol>
<p class="right"><a href="#top">[back to top]</a></p>
<h2><a name="license"/>license</h2>
<p>
log4jdbc is open source software, licensed under the <b>Apache 2.0 license:</b> <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>
</p>
<p class="right"><a href="#top">[back to top]</a></p>
<h2><a name="feedback"/>feedback</h2>
<p>Feedback and suggestions would be greatly appreciated. Email me at arthur_blake at users.sourceforge.net</p>
<p class="right"><a href="#top">[back to top]</a></p>
<h1>
<a href="http://sourceforge.net/project/showfiles.php?group_id=194500&package_id=229335&release_id=502834">download</a> |
<a href="#news">news</a> |
<a href="#features">features</a> |
<a href="#usage">usage</a> |
<a href="apidocs/net/sf/log4jdbc/package-summary.html">javadoc</a> |
<a href="#license">license</a> |
<a href="#feedback">feedback</a>
<br>
<img class="logo" src="log4jdbc-logo-gray.png">
</h1>
</body>
</html>
+12
View File
@@ -30,6 +30,11 @@ log4j.additivity.jdbc.sqlonly=false
log4j.logger.jdbc.sqltiming=DEBUG,sqltiming
log4j.additivity.jdbc.sqltiming=false
! Log connection open/close events and connection number dump
log4j.logger.jdbc.connection=FATAL,connection
log4j.additivity.jdbc.connection=false
! the appender used for the JDBC API layer call logging above, sql only
log4j.appender.sql=org.apache.log4j.FileAppender
log4j.appender.sql.File=./logs/sql.log
@@ -50,3 +55,10 @@ log4j.appender.jdbc.File=./logs/jdbc.log
log4j.appender.jdbc.Append=false
log4j.appender.jdbc.layout=org.apache.log4j.PatternLayout
log4j.appender.jdbc.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
! the appender used for the JDBC Connection open and close events
log4j.appender.connection=org.apache.log4j.FileAppender
log4j.appender.connection.File=./logs/connection.log
log4j.appender.connection.Append=false
log4j.appender.connection.layout=org.apache.log4j.PatternLayout
log4j.appender.connection.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
+16 -3
View File
@@ -37,15 +37,23 @@
</layout>
</appender>
<appender name="jdbc-connection" class="org.apache.log4j.FileAppender">
<param name="File" value="./logs/connection.log"/>
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n"/>
</layout>
</appender>
<!--
The Following 4 logs can be turned on and off while the server is running
The Following 5 logs can be turned on and off while the server is running
LIVE in order to trace the SQL and/or all JDBC coming out of the application.
To turn a log on, set the level value to INFO or DEBUG (to see class name and
line number information in the log) The DEBUG setting is much more inefficient
but the output is much more useful.
To turn off JDBC logging completely, you must set all 4 logs to a level higher
To turn off JDBC logging completely, you must set all 5 logs to a level higher
than ERROR (FATAL is suggested.)
-->
@@ -75,7 +83,12 @@
<level value="fatal"/>
<appender-ref ref="jdbc-appender"/>
</logger>
<!-- log connection open/close events and dump of all open connection numbers -->
<logger name="jdbc.connection" additivity="false">
<level value="fatal"/>
<appender-ref ref="connection-appender"/>
</logger>
<!-- this log is for internal debugging of log4jdbc, itself -->
<!-- debug logging for log4jdbc itself -->
Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

-26
View File
@@ -1,26 +0,0 @@
/*
red in logo is #f06
purple in logo is #ef39e9
*/
.left {text-align:left;}
.right{text-align:right;}
.usage {text-align:left;}
h1 {font-size:1em;color:#f06;background-color:#eee;display:block;padding:0.8em;}
h2 {font-size:1.2em;color:#f06;background-color:#eee;display:block;height:2em;padding-top:0.8em;}
a {text-decoration:none;}
a:link {color: #f06;}
a:visited {color: #f06;}
p {padding:10px;}
span.file {font-weight:bold;}
ul {padding:10px;list-style:square}
ol {padding:10px;list-style:decimal;}
ul li {margin-left:2em;padding:0.3em;}
ol li {margin-left:2em;padding:0.3em;}
li p {margin-left:0;}
code,pre {color:navy;background-color:beige;font-size:11pt;}
pre {border:2px dashed navy;margin-left:3em;margin-right:4em;margin-top:1em;margin-bottom:1em;white-space:pre-line;}
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
+41
View File
@@ -0,0 +1,41 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.googlecode.log4jdbc</groupId>
<artifactId>log4jdbc</artifactId>
<version>1.3-SNAPSHOT</version>
<name>log4jdbc</name>
<description>log4jdbc is a Java 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.</description>
<url>https://github.com/arthurblake/log4jdbc</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.0</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src-jdbc41</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
+8
View File
@@ -0,0 +1,8 @@
log4jdbc is built with Ant 1.8.x and JDK 1.6.x
The build.cmd file is useful for building both the jdbc 3 version (JDK 1.4) and
the jdbc 4 version (under JDK 1.6) under windows. The javadoc.cmd file is
useful for building javadoc (requires the 3rd party ydoc tool)
NOTE: as of 2015-09-30 the jdbc 3 version has been removed - not all build
scripts may have been updated to reflect that.
+12
View File
@@ -0,0 +1,12 @@
@echo off
setlocal
REM (JDBC 3 version removed as of 2015-09-30)
REM invoke the 1.6 jvm for the JDBC 4 version
set ANT_HOME=c:\apache-ant-1.8.1
set JAVA_HOME=C:\jdk\1.6.0_21
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin
call java -version
call ant -Djdbc.level=4 -Djvm.ver=1.6 all
+186 -17
View File
@@ -1,18 +1,76 @@
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!--
Very basic ant build script.
tested with Apache Ant version 1.6.5
Ant build script for log4jdbc
Tested with Apache Ant version 1.6.5 & 1.7
built with jdk 1.4.2_13 (for use with jdbc3)
and/or jdk 1.6.0 (for use with jdbc4)
Copyright 2007-2015 Arthur Blake
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="log4jdbc" default="all" basedir="..">
<!-- the jdbc.level flag should be set externally to either 3 or 4
this is the jdbc version and should be 3 if using a jdk 1.4 or 1.5
the jdbc.level flag should be set to 4 if using a jdk 1.6 or greater.
defaults to jdbc3 build if not set externally
therefore to build both, ant should be invoked twice, setting the jdbc.level externally
to 3 and then 4. and using the jdk 1.4 and then 1.6.
-->
<property name="jdbc.level" value="3" />
<property name="jvm.ver" value="1.4" />
<property name="jdbc.prefix" value="jdbc${jdbc.level}" />
<property name="src" value="src-${jdbc.prefix}" />
<property name="classes" value="classes-${jdbc.prefix}" />
<property name="apidocs" value="doc/apidocs-${jdbc.prefix}" />
<!-- release version -->
<property name="version" value="1.3"/>
<target name="all" depends="cleancompile,compile,cleanjar,jar"/>
<property name="version" value="1.0"/>
<!--
The ydoc.home.3 and ydoc.home.4 properties are only used for the ydoc.3
and ydoc.4 targets for producing javadoc with UML
it requires the commercial ydoc utility
(see http://www.yworks.com/en/products_ydoc.htm)
use the javadoc target to generate regular javadoc
ydoc.home.3 is for jdk1.4 / JDBC 3
ydoc.home.4 is for jdk1.6 / JDBC 4
-->
<property name="ydoc.home.3" value="/ydoc-2.2_04"/>
<property name="ydoc.home.4" value="/ydoc-2.2_04-jdk1.5"/>
<target name="compile" description="compile all the source code">
<javac srcdir="src" destdir="classes" deprecation="true" debug="true">
<javac source="${jvm.ver}" target="${jvm.ver}" srcdir="${src}" destdir="${classes}"
deprecation="true" debug="true" includeAntRuntime="false">
<classpath>
<pathelement location="$src"/>
<fileset dir="lib">
@@ -23,25 +81,45 @@
</target>
<target name="cleancompile" description="delete all the .class files.">
<delete dir="classes"/>
<mkdir dir="classes"/>
<delete dir="${classes}"/>
<mkdir dir="${classes}"/>
</target>
<target name="jar" description="jar up all the class files">
<mkdir dir="build"/>
<jar jarfile="build/log4jdbc-${version}.jar" basedir="classes"/>
<jar jarfile="build/log4${jdbc.prefix}-${version}.jar" basedir="${classes}"/>
</target>
<target name="cleanjar" description="delete the jar file">
<delete file="build/log4jdbc-${version}.jar" description="delete the jar file"/>
<delete file="build/log4${jdbc.prefix}-${version}.jar" description="delete the jar file"/>
</target>
<target name="javadoc" description="generate the javadoc" >
<delete dir="doc/apidocs" />
<mkdir dir="doc/apidocs" />
<javadoc destdir="doc/apidocs" packagenames="net.sf.log4jdbc.*"
Windowtitle="log4jdbc ${version}"
Header="&lt;b&gt;&lt;a href=&quot;http://log4jdbc.sourceforge.net&quot;&gt;log4jdbc ${version}&lt;/a&gt;&lt;/b&gt;"
<target name="cleanjavadoc" description="clean javadoc">
<delete dir="${apidocs}" />
<mkdir dir="${apidocs}" />
</target>
<target name="cleanrelease" description="clean up any release files">
<delete file="../log4jdbc-${version}.zip"/>
</target>
<target name="clean" depends="cleanrelease,cleanjavadoc,cleanjar,cleancompile" description="clean up all build artifacts"/>
<target name="release" depends="cleanrelease" description="make a complete release distribution (a .jar zip and tar.gz file for release)">
<zip destfile="../log4jdbc-${version}.zip">
<zipfileset dir="." prefix="log4jdbc-${version}" excludes="*.zip,*.tar.gz,*,iml,*.ipr,*.iws,thirdparty-stuff/**,classes*/**"/>
</zip>
</target>
<!-- make the javadoc (or ydoc which includes UML diagrams) -->
<target name="javadoc" description="generate the javadoc" depends="cleanjavadoc">
<delete dir="${apidocs}" />
<mkdir dir="${apidocs}" />
<javadoc destdir="${apidocs}" packagenames="net.sf.log4jdbc.*"
Windowtitle="log4${jdbc.prefix} ${version}"
Header="&lt;b&gt;&lt;a href=&quot;http://log4jdbc.sourceforge.net&quot;&gt;log4${jdbc.prefix} ${version}&lt;/a&gt;&lt;/b&gt;"
Use="true" breakiterator="true">
<classpath>
<pathelement location="$src"/>
@@ -49,15 +127,106 @@
<include name="**/*.jar"/>
</fileset>
</classpath>
<sourcepath path="src"/>
<sourcepath path="${src}"/>
<!-- note that the jdk source code is referenced here so that javadoc will be generated from
interface class methods when none is specified in the implementation -->
<!--
<sourcepath path="/j2sdk1.4.2_13/src"/>
<link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
<link href="http://java.sun.com/j2ee/1.4/docs/api/"/>
<link href="http://logging.apache.org/log4j/docs/api/"/>
<link href="http://www.slf4j.org/api/"/>
-->
</javadoc>
</target>
<target name="ydoc.3" description="(jdk1.4/JDBC3 version) create javadoc using ydoc doclet to include UML diagrams" depends="cleanjavadoc">
<property name="ps" value="${path.separator}" />
<javadoc destdir="${apidocs}" packagenames="net.sf.log4jdbc.*"
Windowtitle="log4${jdbc.prefix} ${version}"
Header="&lt;b&gt;&lt;a href=&quot;http://log4jdbc.sourceforge.net&quot;&gt;log4${jdbc.prefix} ${version}&lt;/a&gt;&lt;/b&gt;"
Use="true" breakiterator="true">
<classpath>
<pathelement location="$src"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
<sourcepath path="${src}"/>
<!-- note that the jdk source code is referenced here so that javadoc will be generated from
interface class methods when none is specified in the implementation -->
<sourcepath path="/jdk/1.4.2_19/src"/>
<link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
<!--
<link href="http://java.sun.com/j2ee/1.4/docs/api/"/>
-->
<link href="http://www.slf4j.org/api/"/>
<!-- ydoc doclet for UML diagrams, see http://www.yworks.com/en/products_ydoc.htm -->
<doclet name="ydoc.doclets.YStandard"
path="${ydoc.home.3}/lib/ydoc.jar${ps}${ydoc.home.3}/lib/class2svg.jar${ps}${ydoc.home.3}/resources${ps}${ydoc.home.3}/doc${ps}./${classes}">
<param name="-author"/>
<param name="-generic"/>
<param name="-umlautogen"/>
<param name="-filterpath" value="${ydoc.home.3}/lib/ydoc.jar"/>
<param name="-filter" value="ydoc.filters.ExcludeFilter"/>
<param name="-tag" value="y.precondition"/>
<param name="-tag" value="y.postcondition"/>
<param name="-tag" value="y.complexity"/>
<param name="-tag" value="param"/>
<param name="-tag" value="return"/>
<param name="-tag" value="see"/>
<param name="-tag" value="y.uml"/>
<param name="-linksource" value="true"/>
</doclet>
</javadoc>
</target>
<target name="ydoc.4" description="(jdk1.6/JDBC4 version) create javadoc using ydoc doclet to include UML diagrams" depends="cleanjavadoc">
<property name="ps" value="${path.separator}"/>
<javadoc destdir="${apidocs}" packagenames="net.sf.log4jdbc.*"
maxmemory="512m"
Windowtitle="log4${jdbc.prefix} ${version}"
Header="&lt;b&gt;&lt;a href=&quot;http://log4jdbc.sourceforge.net&quot;&gt;log4${jdbc.prefix} ${version}&lt;/a&gt;&lt;/b&gt;"
Use="true" breakiterator="true">
<classpath>
<pathelement location="$src"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
<sourcepath path="${src}"/>
<!-- note that the jdk source code is referenced here so that javadoc will be generated from
interface class methods when none is specified in the implementation -->
<sourcepath path="/jdk/1.6.0_21/src"/>
<link href="http://java.sun.com/javase/6/docs/api/"/>
<link href="http://www.slf4j.org/api/"/>
<!-- ydoc doclet for UML diagrams, see http://www.yworks.com/en/products_ydoc.htm -->
<doclet name="ydoc.doclets.YStandard"
path="${ydoc.home.4}/lib/ydoc.jar${ps}${ydoc.home.4}/lib/class2svg.jar${ps}${ydoc.home.4}/resources${ps}${ydoc.home.4}/doc${ps}./${classes}">
<param name="-author"/>
<param name="-generic"/>
<param name="-umlautogen"/>
<param name="-filterpath" value="${ydoc.home.4}/lib/ydoc.jar"/>
<param name="-filter" value="ydoc.filters.ExcludeFilter"/>
<param name="-tag" value="y.precondition"/>
<param name="-tag" value="y.postcondition"/>
<param name="-tag" value="y.complexity"/>
<param name="-tag" value="param"/>
<param name="-tag" value="return"/>
<param name="-tag" value="see"/>
<param name="-tag" value="y.uml"/>
<param name="-linksource" value="true"/>
</doclet>
</javadoc>
</target>
</project>
+14
View File
@@ -0,0 +1,14 @@
@echo off
setlocal
REM (JDBC 3 version removed as of 2015-09-30)
REM invoke the 1.6 jvm for the JDBC 4 version
set ANT_HOME=c:\apache-ant-1.8.1
set ANT_OPTS=-Xmx512m
set JAVA_HOME=c:\jdk\1.6.0_21
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin
call java -version
call ant -Djdbc.level=4 -Djvm.ver=1.6 ydoc.4
+28
View File
@@ -0,0 +1,28 @@
@echo off
rem *************************************************************************************************
rem * *
rem * Copyright 2007-2015 Arthur Blake *
rem * *
rem * Licensed under the Apache License, Version 2.0 (the "License"); *
rem * you may not use this file except in compliance with the License. *
rem * You may obtain a copy of the License at *
rem * *
rem * http://www.apache.org/licenses/LICENSE-2.0 *
rem * *
rem * Unless required by applicable law or agreed to in writing, software *
rem * distributed under the License is distributed on an "AS IS" BASIS, *
rem * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
rem * See the License for the specific language governing permissions and *
rem * limitations under the License. *
rem * *
rem *************************************************************************************************
rem *************************************************************************************************
rem * *
rem * Invoke the PostLogProfilerProcessor to process sqltiming log information into a simple *
rem * profiling output report. *
rem * *
rem *************************************************************************************************
java -Xmx1024m -classpath ..\build\log4jdbc3-1.2.jar net.sf.log4jdbc.PostLogProfilerProcessor %*

Some files were not shown because too many files have changed in this diff Show More