Comment 1 for bug 321178

Revision history for this message
Uli Fouquet (uli-gnufix) wrote :

This bug is independent from the used OS. It is already described here:

   https://bugs.launchpad.net/zc.buildout/+bug/125729

where Jim Fulton says, that he won't fix the bug in zc.buildout.

There is, however, the possibility to work around by tearing down the already created loggers before creating new ones. This is for example done in grokproject (before that we had doubles for every line of grokproject output and eggbasket output was displayed even three times!).

The fix could look like this (here taken from grokproject/utils.py)::

  def remove_old_logger_handlers():
      # zc.buildout installs a new log stream on every call of
      # main(). We remove any leftover handlers to avoid multiple output
      # of same content (doubled lines etc.)
      root_logger = logging.getLogger()
      if 'zc.buildout' in root_logger.manager.loggerDict.keys():
          logger = logging.getLogger('zc.buildout')
          for handler in logger.handlers:
              logger.removeHandler(handler)
      return

but had to be done at the appropriate places in z3c.recipe.eggbasket.

Alex, please tell, if you want to fix this, otherwise I'll do it.