Browse files

Don't write duplicate log entries after being daemonized

After being daemonized for the propagate and unpropagate operations,
workspace-control would write duplicate log entries. This happens
because we don't remove the old log handler before adding a new one.
We now remove the log handler when we are closing the log file before
forking.

Closes #103.
  • Loading branch information...
1 parent e9d23be commit 73173b53508db8fc51d16634b6efb26003bd7567 @priteau priteau committed Jul 3, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 control/src/python/workspacecontrol/defaults/Common.py
View
1 control/src/python/workspacecontrol/defaults/Common.py
@@ -123,6 +123,7 @@ def close_logfile(self):
return
if not self.logfilehandler:
return
+ self.log.removeHandler(self.logfilehandler)
self.logfilehandler.close()
self.logfilehandler = None

0 comments on commit 73173b5

Please sign in to comment.