[stdlib-sig] Evolving the Standard Library
vinay_sajip at yahoo.co.uk
Fri Sep 18 10:31:29 CEST 2009
Raymond Hettinger <python at ...> writes:
> While I'm no fan of the logging module, it is widely used.
> It was based on a Java version and Guido blessed it early-on.
Raymond, I took *some ideas* from log4j. In that sense it was "based on", but it
is not a port. While Guido did bless it, I do believe it went through a
reasonable review process on python-dev (where you could certainly have given
some feedback - I don't remember that you did) and I changed the package in
response to various concerns from various people. It certainly didn't feel to me
like a rubber-stamping exercise - do you feel that it was?
Logging's current design is based on the premise that logging is concerned with
"What happened?", "Where did it happen?", "How important is it?" and "Who wants
to know?", and this is completely general and not tied to any language or
environment. Of course there are many designs which could be developed from such
a premise, and the present design is just one such. The abstractions in log4j
(such as a hierarchical namespace for loggers, and handlers as orthogonal to
loggers, whereas many systems conflate them) made sense to me (and to a lot of
others), and it's no surprise that I named my abstractions similarly where that
made sense. Beyond that, there's little correspondence between log4j's code and
the code in Python's logging.
I'm sorry you're not a fan. Is it an aesthetic thing, or have you had specific
More information about the stdlib-sig