Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68399

Re: Clearing out handlers in logging?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'explicit': 0.07; 'method.': 0.07; 'indeed,': 0.09; '*always*': 0.16; '-tkc': 0.16; 'bit.': 0.16; 'clarified': 0.16; 'dig': 0.16; 'docs.': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'hint': 0.16; 'logger': 0.16; 'methods;': 0.16; 'subject:Clearing': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'pieces': 0.19; 'code,': 0.22; 'sorry,': 0.24; 'helpful': 0.24; 'initial': 0.24; 'question': 0.24; 'source': 0.25; 'header :In-Reply-To:1': 0.27; 'tried': 0.27; 'generally': 0.29; 'along': 0.30; "i'm": 0.30; 'lines': 0.31; 'posting': 0.31; 'figure': 0.32; 'guess': 0.33; 'not.': 0.33; "i'd": 0.34; 'could': 0.34; 'knows': 0.35; 'case,': 0.35; 'but': 0.35; 'there': 0.35; 'charset:us- ascii': 0.36; 'subject:?': 0.36; 'should': 0.36; 'clear': 0.37; 'to:addr:python-list': 0.38; 'that,': 0.38; 'to:addr:python.org': 0.39; 'enough': 0.39; 'read': 0.60; 'information': 0.63; 'more': 0.64; 'grow': 0.77; 'article': 0.77; 'basics.': 0.84; 'received:50.22': 0.84
Date Sun, 16 Mar 2014 13:50:26 -0500
From Tim Chase <python.list@tim.thechases.com>
To python-list@python.org
Subject Re: Clearing out handlers in logging?
In-Reply-To <gd.usenet-EA8AA5.19294616032014@dwarf.main.lan>
References <mailman.8159.1394938715.18130.python-list@python.org> <gd.usenet-B1805D.09394016032014@dwarf.main.lan> <mailman.8167.1394974663.18130.python-list@python.org> <gd.usenet-EA8AA5.19294616032014@dwarf.main.lan>
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - boston.accountservergroup.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - tim.thechases.com
X-Get-Message-Sender-Via boston.accountservergroup.com: authenticated_id: tim@thechases.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8172.1394995811.18130.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1394995812 news.xs4all.nl 2877 [2001:888:2000:d::a6]:43761
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68399

Show key headers only | View raw


On 2014-03-16 19:29, Gunther Dietrich wrote:
> >> Indeed, THERE IS a removeHandler() method.  
> >
> >Yes, I'm aware of it, having read the source & docs.  However, the
> >signature is  
> 
> Sorry, your original article lacks information about what you
> already know/tried and what not. So it is a bit misleading and
> makes the impression, you would't read the documentation. It would
> have been helpful if you had told us your preconditions.

Heh, I tried to make that clear in my initial posting with the "since
there are other methods for adding/removing handlers" bit.  I guess I
could have been more explicit though as to what I'd tried.  I
generally figure that, if someone knows enough to dig into the
stdlib's source code, they also know enough to use dir() and help().
Not *always* the case, but a good hint that they're past the basics.

But I could have clarified my question more along the lines of
"Should log.handlers be public/documented; should Logger grow
clearHandlers() and iterHandlers() methods; or should I wantonly use
log.handlers but then just get to keep both pieces if/when it breaks?"

-tkc


Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Clearing out handlers in logging? Tim Chase <python.list@tim.thechases.com> - 2014-03-15 21:58 -0500
  Re: Clearing out handlers in logging? Gunther Dietrich <gd.usenet@spamfence.net> - 2014-03-16 09:39 +0100
    Re: Clearing out handlers in logging? Chris Angelico <rosuav@gmail.com> - 2014-03-16 20:02 +1100
    Re: Clearing out handlers in logging? Peter Otten <__peter__@web.de> - 2014-03-16 10:18 +0100
    Re: Clearing out handlers in logging? Chris Angelico <rosuav@gmail.com> - 2014-03-16 20:35 +1100
    Re: Clearing out handlers in logging? Tim Chase <python.list@tim.thechases.com> - 2014-03-16 07:57 -0500
      Re: Clearing out handlers in logging? Gunther Dietrich <gd.usenet@spamfence.net> - 2014-03-16 19:29 +0100
        Re: Clearing out handlers in logging? Tim Chase <python.list@tim.thechases.com> - 2014-03-16 13:50 -0500

csiph-web