kj schrieb:
In <7hsukcf2tqht...@mid.uni-berlin.de> "Diez B. Roggisch" <de...@nospam.web.de> 
writes:

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.

I'm sorry for my ignorance, but what exactly do you mean by
"injecting" the new class into the "logging.handlers-module"?  And
what is "the logfile-format"?

The logfile format as specified in the documentation fo the logging-module. And due to some restrictions in the way how this instantiates declared logging-handlers, you need to set your own class into logging.handlers:

import logging.handlers as h

class MyHandler(...):
    ...


h.MyHandler = MyHandler


# now you can load the config.

Diez
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to