quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nic Ferrier <nferr...@tapsellferrier.co.uk>
Subject Re: glue between apache and python logging
Date Wed, 19 Oct 2005 19:57:33 GMT
Nick <nick@dd.revealed.net> writes:

> Maybe I just don't have enough exposure, but I don't see the logging 
> module used as ubiquitously as you seem to imply.  I could agree with 
> you if logging was used everywhere, even in Python and its standard 
> modules.  I could be wrong, but I just don't see it.

Ok. I think this is a false argument as well.

Python's official API has the logging package. It has been there since
2.3 (and actually lots of projects did use it since 2.1 I think).

logging is not normally used by API code, it's application specific,
so you're unlikely to find it being used by the python APIs.

Why does this need more imperative evidence to convince you? It's the
official logging module for Python. 

Wanna roll your own? 

Well, you can do that but you probably shouldn't for all the reasons
that you probably shouldn't roll your own pickler: readability, reuse, 

[Note: I did say: *probably* shouldn't]


> Well, while you may see interfacing with the logging module as 
> "essential" for your work, I just don't see it as a general case.  In my 
> case, I ultimately decided not to use the logging module because it was 
> more cumbersome than I needed my logging to be.  I wanted to be light 
> and flexible, and anyone using my stuff could implement a logging 
> handler to use my interfaces, if they liked.

Light and flexible? More light than:

   import logging
   logging.getLogger().log("some message")

and more flexible than Python logging? Have you read the doc?



> Call it a difference of opinion until someone can change my mind :)

I believe I'm trying to change your mind.

But it's difficult to change your mind if you say "prove that logging
is the most widely used logging available and then I'll think about it
but I don't use it anyway because I wrote my own".

Unfortunately I have to argue from the position that logging is
officially part of the python language.


Nic

Mime
View raw message