utils.SetupLogging: Remove previously setup handlers
authorMichael Hanselmann <hansmi@google.com>
Wed, 12 Nov 2008 12:51:54 +0000 (12:51 +0000)
committerMichael Hanselmann <hansmi@google.com>
Wed, 12 Nov 2008 12:51:54 +0000 (12:51 +0000)
commit6346a9e5f87073d0d80c63f53c1823e2f42edf4b
tree90d08ec5bc1da40145fee6fbf87c81971bef87f0
parenta381174523b2cf2e89bb679c4841e33817b1a14e
utils.SetupLogging: Remove previously setup handlers

If a logging function is called before the logging module is setup
using utils.SetupLogging, it calls logging.basicConfig, which adds
a StreamHandler, on its own. If we leave it in, all log output will
be printed twice on stderr. This patch makes sure to remove all
handlers before adding our own.

Reviewed-by: iustinp
lib/utils.py