Skip to content

Commit 1fbc3e2

Browse files
committed
transport: Centralize XMLRPC method+args logging
1 parent 9dbb4b2 commit 1fbc3e2

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

bugzilla/base.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ def product_get(self, ids=None, names=None,
748748
if exclude_fields:
749749
kwargs["exclude_fields"] = exclude_fields
750750

751-
log.debug("Calling Product.get with: %s", kwargs)
752751
ret = self._proxy.Product.get(kwargs)
753752
return ret['products']
754753

@@ -874,7 +873,6 @@ def getcomponents(self, product, force_refresh=False):
874873
product_id = proddict["id"]
875874

876875
opts = {'product_id': product_id, 'field': 'component'}
877-
log.debug("Calling Bug.legal_values with: %s", opts)
878876
names = self._proxy.Bug.legal_values(opts)["values"]
879877
self._cache.component_names[product_id] = names
880878

@@ -926,7 +924,6 @@ def addcomponent(self, data):
926924
'''
927925
data = data.copy()
928926
self._component_data_convert(data)
929-
log.debug("Calling Component.create with: %s", data)
930927
return self._proxy.Component.create(data)
931928

932929
def editcomponent(self, data):
@@ -938,7 +935,6 @@ def editcomponent(self, data):
938935
'''
939936
data = data.copy()
940937
self._component_data_convert(data, update=True)
941-
log.debug("Calling Component.update with: %s", data)
942938
return self._proxy.Component.update(data)
943939

944940

@@ -1023,7 +1019,6 @@ def _getbugs(self, idlist, permissive,
10231019
getbugdata.update(self._process_include_fields(
10241020
include_fields, exclude_fields, extra_fields))
10251021

1026-
log.debug("Calling Bug.get with: %s", getbugdata)
10271022
r = self._proxy.Bug.get(getbugdata)
10281023

10291024
if self._check_version(4, 0):
@@ -1251,7 +1246,6 @@ def query(self, query):
12511246
Also see the _query() method for details about the underlying
12521247
implementation.
12531248
'''
1254-
log.debug("Calling Bug.search with: %s", query)
12551249
try:
12561250
r = self._proxy.Bug.search(query)
12571251
except Fault as e:
@@ -1307,7 +1301,6 @@ def update_bugs(self, ids, updates):
13071301
tmp = updates.copy()
13081302
tmp["ids"] = self._listify(ids)
13091303

1310-
log.debug("Calling Bug.update with: %s", tmp)
13111304
return self._proxy.Bug.update(tmp)
13121305

13131306
def update_tags(self, idlist, tags_add=None, tags_remove=None):
@@ -1325,7 +1318,6 @@ def update_tags(self, idlist, tags_add=None, tags_remove=None):
13251318
"tags": tags,
13261319
}
13271320

1328-
log.debug("Calling Bug.update_tags with: %s", d)
13291321
return self._proxy.Bug.update_tags(d)
13301322

13311323
def update_flags(self, idlist, flags):
@@ -1592,7 +1584,6 @@ def updateattachmentflags(self, bugid, attachid, flagname, **kwargs):
15921584
flags.update(kwargs)
15931585
update = {'ids': [int(attachid)], 'flags': [flags]}
15941586

1595-
log.debug("Calling Bug.update_attachment(%s)", update)
15961587
return self._proxy.Bug.update_attachment(update)
15971588

15981589
def get_attachments(self, ids, attachment_ids,
@@ -1614,7 +1605,6 @@ def get_attachments(self, ids, attachment_ids,
16141605
if exclude_fields:
16151606
params["exclude_fields"] = self._listify(exclude_fields)
16161607

1617-
log.debug("Calling Bug.attachments(%s)", params)
16181608
return self._proxy.Bug.attachments(params)
16191609

16201610

@@ -1727,7 +1717,6 @@ def createbug(self, *args, **kwargs):
17271717
be passed.
17281718
'''
17291719
data = self._validate_createbug(*args, **kwargs)
1730-
log.debug("Calling Bug.create with: %s", data)
17311720
rawbug = self._proxy.Bug.create(data)
17321721
return Bug(self, bug_id=rawbug["id"],
17331722
autorefresh=self.bug_autorefresh)
@@ -1764,7 +1753,6 @@ def _getusers(self, ids=None, names=None, match=None):
17641753
raise BugzillaError('_get() needs one of ids, '
17651754
' names, or match kwarg.')
17661755

1767-
log.debug("Calling User.get with: %s", params)
17681756
return self._proxy.User.get(params)
17691757

17701758
def getuser(self, username):
@@ -1845,5 +1833,4 @@ def updateperms(self, user, action, groups):
18451833
}
18461834
}
18471835

1848-
log.debug("Call User.update with: %s", update)
18491836
return self._proxy.User.update(update)

bugzilla/transport.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ def _ServerProxy__request(self, methodname, params):
8888
if len(params) == 0:
8989
params = ({}, )
9090

91+
log.debug("XMLRPC call: %s(%s)", methodname, params[0])
92+
9193
if self.api_key is not None:
9294
if 'Bugzilla_api_key' not in params[0]:
9395
params[0]['Bugzilla_api_key'] = self.api_key

0 commit comments

Comments
 (0)