Author: phd
Date: 2007-02-22 08:05:54 -0700 (Thu, 22 Feb 2007)
New Revision: 2345
Modified:
SQLObject/docs/News.txt
SQLObject/docs/SQLObject.txt
Log:
Use logging if it's available and is configured via DB URI.
Modified: SQLObject/docs/News.txt
===================================================================
--- SQLObject/docs/News.txt 2007-02-22 15:03:43 UTC (rev 2344)
+++ SQLObject/docs/News.txt 2007-02-22 15:05:54 UTC (rev 2345)
@@ -39,6 +39,8 @@
* MySQLConnection got new keyword "conv" - a list of custom converters.
+* Use logging if it's available and is configured via DB URI.
+
Small Features
--------------
Modified: SQLObject/docs/SQLObject.txt
===================================================================
--- SQLObject/docs/SQLObject.txt 2007-02-22 15:03:43 UTC (rev 2344)
+++ SQLObject/docs/SQLObject.txt 2007-02-22 15:05:54 UTC (rev 2345)
@@ -161,7 +161,8 @@
Parameters are: ``debug`` (default: False), ``debugOutput`` (default: False),
``cache`` (default: True), ``autoCommit`` (default: True),
-``debugThreading`` (default: False).
+``debugThreading`` (default: False),
+``logger`` (default: None), ``loglevel`` (default: None).
If you want to pass True value in a connection URI - pass any non-empty
string; an empty string for False.
@@ -1523,6 +1524,16 @@
true, then any SQL sent to the database will also be printed to the
console.
+You can additionally pass `logger` keyword argument which should be a name
+of the logger to use. If specified and `debug` is ``True``, SQLObject will
+write debug print statements via that logger instead of printing directly
+to console. Note that this options requires logging module which is
+available starting from Python 2.3. The argument `loglevel` allows to
+choose the logging level - it can be "debug", "info", "warning", "error",
+"critical" or "exception". In case `logger` is empty or absent SQLObject
+uses prints instead of logging; `loglevel` can be "stdout" or "stderr" in
+this case; default is "stdout".
+
MySQL
-----
|