Skip to content

Commit

Permalink
Use all duplog msg kwargs to produce a signature
Browse files Browse the repository at this point in the history
Not just svcname, so changes in kwargs re-log the changed message.
  • Loading branch information
cvaroqui committed Oct 3, 2017
1 parent fea2b38 commit afaf35b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/osvcd_shared.py
Expand Up @@ -551,12 +551,12 @@ def placement_ranks(self, svc, candidates=None):
return [rcEnv.nodename]

def duplog(self, lvl, msg, **kwargs):
svcname = kwargs.get("svcname")
if svcname is None:
sig = str(kwargs.items())
if sig is None:
return
if svcname in self.duplog_data and msg == self.duplog_data[svcname]:
if sig in self.duplog_data and msg == self.duplog_data[sig]:
return
self.duplog_data[svcname] = msg
self.duplog_data[sig] = msg
if lvl == "info":
fn = self.log.info
elif lvl == "warning":
Expand Down

0 comments on commit afaf35b

Please sign in to comment.