[Persistence-sig] "Straw Man" transaction API
Guido van Rossum
guido@python.org
Fri, 19 Jul 2002 12:09:01 -0400
> One further comment on the Straw Man transaction API... I believe that the
> Python transaction API should issue Python warnings for problematic
> conditions, rather than write to a logger (such as zLOG in the current ZODB
> transactions).
>
> IMHO, even though 2.3 will include a logging mdoule, I'm not comfortable
> with the idea of a transaction co-ordinator itself issuing log messages,
> especially given the complexity of the logging package that's the main
> contender for implementing the logging PEP. I'd rather have something
> extremely simple, and warnings seem to me like the way to, well, issue
> warnings. :)
>
> If there's conflict about this point, though, I'd be okay with isolating
> either log calls or warnings into methods of the base transaction that
> could be overridden in a subclass, and then folks can choose their own way
> from there.
Warnings seem better to me because there are several ways to decide
how to deal with them (including turning them into errors and
suppressing them completely) under control of either the program or
command line options.
It's also possible to have warnings be sent to a logger, and
applications that use the logger should probably set this up. (Hm,
maybe it would be cool if the logging module has a shortcut to
redirect all warnings to the log?)
--Guido van Rossum (home page: http://www.python.org/~guido/)