Mario Frasca wrote at 2006-11-21 16:46 +0100:
> ...
>as I see it, logging has to do with every module, so since there is a
>standard logging module, my feeling is that there could be also a
>standard logging policy...

I do not think so...

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.

Whether or not I want to see logs of these operations is independent
from the logging policy I like for other modules.

>a client (a program) using modules could take advance of the fact that
>modules log in a standardized way all kind of information... (once they do
>so, I mean) the program would then decide whether to handle the messages
>or not.  [[ about performance: according to the documentation of the
>logging module, a logging call to a logger set to a higher logging level
>(a DEBUG message to a logger set to CRITICAL) is discarded immediately
>after a level comparison ]]

I have seen discarded logging generate a quadratic runtime behavior:

  This occured as follows: The information could be very large.
  To limit the amount of logging, a "limited_repr" was used.
  This "limited_repr" had the quadratic runtime (for some data types).
  As the "limited_repr" was used in the log parameter, the price
  was already paid before the log record was discarded.


Logging database operations can also involve huge data...



-- 
Dieter
_______________________________________________
DB-SIG maillist  -  DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig

Reply via email to