[REVIEW] PRoposed fix (Re: post-test failures in bzr.dev)

Olaf Conradi olaf at conradi.org
Fri Apr 7 12:32:13 BST 2006


On 07/04/06, Robert Collins <robertc at robertcollins.net> wrote:
> On Thu, 2006-04-06 at 23:28 +0200, Olaf Conradi wrote:
> > Hi
> >
> > This will remove the handler from the internal handler list inside
> > python's logging module, preventing logging.shutdown() of closing it
> > twice.
> >
> > Mergable from
> > http://deschacht.student.utwente.nl/bzr/bazaar-vcs/bzr.olaf.logging/
>
> Should that be in the opposite order - close and remove, not remove and
> close ?

I thought about it, but no, I think it should be like this.

removeHandler only removes it from _bzr_logger, so nothing new can be
logged to this handle. Then it's safe to close the handle.

> Also, flush() is not needed - close flushes.

For FileStreams it does. Don't think it's guarenteed in general (as
logger's shutdown also forces a flush).

I removed the flush from my branch.

Cheers,
 -Olaf




More information about the bazaar mailing list