From 9914c6431bcaa952227d103c90123e3d1827c0f4 Mon Sep 17 00:00:00 2001 From: Michael Dick Date: Wed, 16 Jun 2010 21:22:04 +0000 Subject: [PATCH] OPENJPA-1678: Update documentation re: PrintParameters git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@955396 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/doc/manual/ref_guide_dbsetup.xml | 18 +++++++++++++++++- .../src/doc/manual/ref_guide_logging.xml | 10 ++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml b/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml index 1254e3241..abd0e40b0 100644 --- a/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml +++ b/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml @@ -180,6 +180,22 @@ logged SQL statements. each pretty-printed SQL line. + + + + + SQL + + + PrintParameters + + +PrintParameters: A boolean indicating whether SQL parameter +values will be included in exception text and when logging is enabled. Since +the parameter values may contain sensitive information the default value is +false. + + @@ -193,7 +209,7 @@ each pretty-printed SQL line. <property name="openjpa.ConnectionURL" value="jdbc:hsqldb:db-hypersonic"/> <property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver"/> <property name="openjpa.ConnectionFactoryProperties" - value="PrettyPrint=true, PrettyPrintLineLength=80"/> + value="PrettyPrint=true, PrettyPrintLineLength=80, PrintParameters=True"/> diff --git a/openjpa-project/src/doc/manual/ref_guide_logging.xml b/openjpa-project/src/doc/manual/ref_guide_logging.xml index 8b8241d23..24c8bef41 100644 --- a/openjpa-project/src/doc/manual/ref_guide_logging.xml +++ b/openjpa-project/src/doc/manual/ref_guide_logging.xml @@ -177,6 +177,16 @@ about possible performance concerns will be logged to the INFO use. Detailed information about the execution of SQL statements will be sent to the TRACE level. It is useful to enable this channel if you are curious about the exact SQL that OpenJPA issues to the datastore. + +The SQL issued to the database may contain sensitive information. By default the +parameter values used in the prepared statements generated by OpenJPA will not +be printed in the SQL log - instead you will see a ? for each value. The actual +values may be printed by adding PrintParameters=True to the + +openjpa.ConnectionFactoryProperties property. Also +see Using the OpenJPA +DataSource + When using the built-in OpenJPA logging facilities, you can enable SQL logging