A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/021568.html below:

[Python-Dev] Re: PEP 282 comments

[Python-Dev] Re: PEP 282 commentsBarry A. Warsaw barry@zope.com
Thu, 21 Mar 2002 09:55:46 -0500
>>>>> "TM" == Trent Mick <trentm@ActiveState.com> writes:

    TM> Jeremy, The methods use 'msg, *args' instead of just 'msg' to
    TM> avoid string interpolation if the message will not be logged.
    TM> I think that that is still important to keep, albeit it making
    TM> the 'exc' keyword argument less explicit.

I really like my logging interface, which also uses *args.  This just
seems really convenient, and like you said, allows you to avoid some
extra work if the logging is disabled:

    syslog('vette', 'banned subscription: %s (matched: %s)',
                     email, pattern)

(There's a mismatch in my API and the PEP 282 API: `syslog' is a
global Logger instance that takes the file to log to -- relative to a
known directory -- as its first argument.  I don't think this is
insurmountable.)

-Barry



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4