[DB-SIG] Extending DB-API

Mario Frasca mfrasca at zonnet.nl
Mon Nov 20 16:40:42 CET 2006


On 2006-1116 12:59:28, Ian Bicking wrote:
> The major things I think we can standardize:

may I propose one more point...

what about using the standard logging module (if available) to unify
the logging style?  I would be happy if a db-api2 module would...

* expose a logger named as the module,
* set its verbosity to logging.WARNING (or ERROR),
* log relevant errors, warning and debug info at the proper level,
* log SQL commands at INFO level (maybe long parameters lists as DEBUG?)

a program loading the module may choose to modify the logging level
of the module and get all information generated by the module into the
handlers defined by the program.

what do you think about it?

thanks, regards,
Mario Frasca

-- 
"Le soldat et le prêtre, ce sont les pires ennemis de
 l'humanité, car si le soldat tue, le prêtre ment." 
(Victor Hugo


More information about the DB-SIG mailing list