DBHandler class for logging?

Diez B. Roggisch deets at nospam.web.de
Tue Sep 22 17:41:32 EDT 2009


kj schrieb:
> I've come across mentions of a mythical class of logging handlers
> called DBHandler, but I can't find it anywhere.
> 
> Could someone please point me in the right direction?
> 
> (FWIW, I'm looking for ways to log messages to PostgreSQL RDBMS.)

I'm not aware such a thing is part of the standard logging package. But 
it's trivial to write one, we did so ourselves. Depending on your 
version of python, you need to inject the class into the 
logging.handlers-module to make it loadable by the logfile-format. AFAIK 
since 2.6 that restriction is gone.

Diez



More information about the Python-list mailing list