Change in vdsm[master]: BindingXMLRPC: flowID for Irs calls

danken at redhat.com danken at redhat.com
Thu Jan 17 22:40:08 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: BindingXMLRPC: flowID for Irs calls
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(3 inline comments)

Thanks for looking into this.

maybe, just maybe, flowID and client should be pushed to hsm's threadLocal data, to be used directly there.

(no chance Ayal would agree to that)

....................................................
File vdsm/BindingXMLRPC.py
Line 160:         def wrapIrsMethod(f):
Line 161:             def wrapper(*args, **kwargs):
Line 162:                 # Logging current call
Line 163:                 logStr = 'client [%s]::call %s with %s %s' % \
Line 164:                     (getattr(f.im_self.cif.threadLocal, 'client', ''),
the storage dispatcher already logs the args. we should not spam the logs so much.
Line 165:                      f.__name__, args, kwargs)
Line 166: 
Line 167:                 # if flowID exists
Line 168:                 if getattr(f.im_self.cif.threadLocal,


Line 168:                 if getattr(f.im_self.cif.threadLocal,
Line 169:                            'flowID', None) is not None:
Line 170:                     logStr += " flowID [%s]" % f.im_self.cif.threadLocal.flowID
Line 171: 
Line 172:                 f.im_self.log.log(logging.DEBUG, logStr)
it's considered nicer to log stuff using

 log.debug(formatstr, *args)

since it skips string rendering if the log level is higher than DEBUG.
Line 173: 
Line 174:                 if self.cif.threadLocal.client:
Line 175:                     f.im_self.log.debug('[%s]', self.cif.threadLocal.client)
Line 176:                 try:


Line 171: 
Line 172:                 f.im_self.log.log(logging.DEBUG, logStr)
Line 173: 
Line 174:                 if self.cif.threadLocal.client:
Line 175:                     f.im_self.log.debug('[%s]', self.cif.threadLocal.client)
it seems that this is printed twice now.
Line 176:                 try:
Line 177:                     return f(*args, **kwargs)
Line 178:                 except:
Line 179:                     f.im_self.log.error("Unexpected exception", exc_info=True)


--
To view, visit http://gerrit.ovirt.org/11164
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icffc8f4f4bdbcf96f99bdb5608e46410c5f23e23
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Haim Ateya <hateya at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list