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: 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 To: python-list@python.org Subject: Re: Clearing out handlers in logging? In-Reply-To: References: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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