Optional use of logging library module

Eric DeWall edewall at qualcomm.com
Thu Jun 24 18:33:32 EDT 2004


Hi Neil,

First off, happy to see someone else with some real appreciation for a
standardized and full-featured logging module!  You're preaching to the
choir a bit here - I'm also not a speed freak and I will personally _always_
associate a logger with my class instance.  But some folks _don't_
use/like/appreciate the logging module so I'd rather not make it a
requirement for them to use logging to reuse my classes.  Irmen's suggestion
of the null pattern elegantly solves my dilemma.  And for folks who don't
want logging, they'll still have to handle exceptions when something goes
wrong.  :)

--Eric

"Neil Benn" <benn at cenix-bioscience.com> wrote in message
news:mailman.84.1088086108.27577.python-list at python.org...
>
<snip>
>
>     However what I would suggest could be a good solution for you is to
> always have a logger present and log debug messages as debug and use the
> other levels for what they are meant for WARNING, ERROR, etc.  That way
> you can easily turn the logger off in the instance you are working
> with.  Yes, OK you take a small speed knock but the speed knock I've had
> on this is small (I'm not a speed junkie anyways).
>
>     I also agree with you, a fully featured logger is essential and
> personally - I'm happy with the design, it's not too complicated you
> only need to read through the docs and try it out - easy peasy lemon
> squeezy.
>
> Cheers,
>
> Neil
>
<snip>





More information about the Python-list mailing list