Have to clean up logger handlers in same cases to avoid duplicate messages

Mon, 22 Jan 2018 19:14:47 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 22 Jan 2018 19:14:47 +0000
changeset 52
aef860e99323
parent 51
1614b2184bb4
child 53
442c558bd632

Have to clean up logger handlers in same cases to avoid duplicate messages

borgend.py file | annotate | diff | comparison | revisions
--- a/borgend.py	Mon Jan 22 18:59:10 2018 +0000
+++ b/borgend.py	Mon Jan 22 19:14:47 2018 +0000
@@ -27,6 +27,7 @@
 #
 
 logger=logging.getLogger(appname)
+logger.handlers.clear()
 logger.setLevel(loglevel)
 stderrlog=logging.StreamHandler()
 stderrlog.setLevel(logging.WARNING)

mercurial