On 2006-1122 19:57:07, Dieter Maurer wrote: > Usually, I do not want to see logs of database operations > (as they may contain sensible information) *BUT* if I am > analysing problems with database interaction, I want such > operations logged.
the standard logging module solves this quite nicely. a logger placed at logging.ERROR level will not log anything except errors... (we could prescribe that data is not logged above the logging.INFO level...) on the other hand, if a module does not do logging, either you add it yourself or you don't have it. (duh!) > Whether or not I want to see logs of these operations is independent > from the logging policy I like for other modules. I've been using the logging module recently extensively and it answers exactly this kind of problems, this is why I was suggesting to include in the db-api3 some reference to HOW to log things IF the module wants to log things... > I have seen discarded logging generate a quadratic runtime behavior: > > This occured as follows: [...] funny. but this is not a problem here, since discarding a logging call is done just based on the 'level' of the logger and the 'level' of the message. if the message level is below the logger level, then the logger returns immediately. as stated before, I feel that logging is an important part of a piece of software. we have a standard logging module. we are writing a set of directives for writing modules. these directives could prescribe the way to make use of the standard logging module. or not, then each of us will need to build a layer around the modules used, in order to get things the way he needs... which is what we're already doing... regards, Mario. _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig