Author: tmckay
Date: 2012-02-13 21:32:10 +0000 (Mon, 13 Feb 2012)
New Revision: 5218
Modified:
trunk/cumin/python/cumin/grid/negotiator.py
trunk/cumin/python/cumin/grid/slot.py
trunk/cumin/python/cumin/grid/tags.py
trunk/cumin/python/cumin/main.py
trunk/cumin/python/cumin/messaging/binding.py
trunk/cumin/python/cumin/model.py
trunk/cumin/python/cumin/objecttask.py
trunk/cumin/python/cumin/qmfadapter.py
trunk/cumin/python/cumin/task.py
trunk/mint/python/mint/update.py
trunk/mint/python/mint/util.py
trunk/rosemary/python/rosemary/sqloperation.py
trunk/sage/python/sage/qmf/qmfoperations.py
Log:
Remove all log.exception calls and replace with log.debug(msg, exc_info=True)
This allows exception traces at the debug level but keeps exception traces
out of INFO level logging.
BZ782839
Modified: trunk/cumin/python/cumin/grid/negotiator.py
===================================================================
--- trunk/cumin/python/cumin/grid/negotiator.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/cumin/python/cumin/grid/negotiator.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -81,8 +81,7 @@
if not results.exception:
try:
groups = self.split_group_names(groups)
- except Exception, e:
- #log.exception(e)
+ except:
groups = []
if groups:
@@ -171,8 +170,8 @@
info[group][config] = ""
##raw_configs[config][group].error
elif raw_configs[config][group].got_data:
info[group][config] =
raw_configs[config][group].data['Value']
- except Exception, e:
- log.exception(e)
+ except:
+ log.debug("Problem getting group config info", exc_info=True)
self.info.set(session, info)
return info
Modified: trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- trunk/cumin/python/cumin/grid/slot.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/cumin/python/cumin/grid/slot.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -284,8 +284,8 @@
act = None
try:
cat, cat_group = cls.categories[(state, act)]
- except Exception, e:
- log.exception(e)
+ except:
+ log.debug("Problem finding state and activity", exc_info=True)
cat, cat_group = ("%s:%s" % (state, activity),
"Unknown")
return cat, cat_group
Modified: trunk/cumin/python/cumin/grid/tags.py
===================================================================
--- trunk/cumin/python/cumin/grid/tags.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/cumin/python/cumin/grid/tags.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -105,8 +105,8 @@
for i, tag in enumerate(wallaby_tags):
data.append({'Tag':str(escape_entity(tag.name)),
'Features':", ".join(tag.features),
'NumHosts':len(self.app.wallaby.get_node_names(tag)),
'Host':self.app.wallaby.get_node_names(tag)} )
- except Exception, e:
- log.exception(e)
+ except:
+ log.debug("Problem adapting wallaby response", exc_info=True)
return data
@@ -1038,9 +1038,9 @@
self.invoc = invoc
try:
call_async(self.callback, self.app.wallaby.edit_tags, node_name, *tags)
- except Exception, e:
+ except:
invoc.status = invoc.FAILED
- log.exception(e)
+ log.debug("Edit node failed", exc_info=True)
invoc.end()
class TagsTagEditTask(ObjectFrameTask):
@@ -1084,10 +1084,10 @@
self.invoc = invoc
try:
call_async(self.callback, self.make_calls, invoc, tag, chosen_nodes)
- except Exception, e:
+ except:
self.call_count = 0
invoc.status = invoc.FAILED
- log.exception(e)
+ log.debug("Edit tag failed", exc_info=True)
invoc.end()
def make_calls(self, invoc, tag, chosen_nodes):
@@ -1112,10 +1112,10 @@
current_tags.remove(tag)
self.call_count += 1
call_async(self.callback, self.app.wallaby.edit_tags, node,
*current_tags)
- except Exception, e:
+ except:
self.call_count = 0
invoc.status = invoc.FAILED
- log.exception(e)
+ log.debug("Edit tag failed", exc_info=True)
invoc.end()
return False
return None
@@ -1162,9 +1162,9 @@
self.invoc = invoc
try:
call_async(self.callback, self.app.wallaby.edit_features, tag,
*chosen_features)
- except Exception, e:
+ except:
invoc.status = invoc.FAILED
- log.exception(e)
+ log.debug("Edit feature failed", exc_info=True)
invoc.end()
class ActivateConfigTask(Task):
@@ -1189,9 +1189,9 @@
self.invoc = invoc
try:
call_async(self.callback, self.app.wallaby.activate_configuration)
- except Exception, e:
+ except:
invoc.status = invoc.FAILED
- log.exception(e)
+ log.debug("Activate config failed", exc_info=True)
invoc.end()
class AddTags(Task):
@@ -1220,9 +1220,9 @@
try:
call_async(self.callback, self.app.wallaby.create_tags, tags)
- except Exception, e:
+ except:
invoc.status = invoc.FAILED
- log.exception(e)
+ log.debug("Adding tags failed", exc_info=True)
invoc.end()
class RemoveNodeTags(ObjectSelectorTask):
@@ -1260,9 +1260,9 @@
def do_invoke(self, invoc, tags):
try:
call_async(self.callback, self.app.wallaby.remove_tags, tags)
- except Exception, e:
+ except:
invoc.status = invoc.FAILED
- log.exception(e)
+ log.debug("Remove node tags failed", exc_info=True)
def get_item_content(self, session, item):
return item
@@ -1278,4 +1278,4 @@
item_list.append(str(item.name))
item_list.sort()
- return item_list
\ No newline at end of file
+ return item_list
Modified: trunk/cumin/python/cumin/main.py
===================================================================
--- trunk/cumin/python/cumin/main.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/cumin/python/cumin/main.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -645,8 +645,8 @@
submission = self.cls.get_object_by_id(session.cursor, submission_id)
cls = self.app.model.com_redhat_grid.JobServer
return cls.get_object_by_id(session.cursor, submission._jobserverRef_id)
- except Exception, e:
- log.exception(e)
+ except:
+ log.debug("Getting job server failed", exc_info=True)
class NameColumn(ObjectLinkColumn):
def render_cell_href(self, session, record):
Modified: trunk/cumin/python/cumin/messaging/binding.py
===================================================================
--- trunk/cumin/python/cumin/messaging/binding.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/cumin/python/cumin/messaging/binding.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -40,7 +40,7 @@
except Exception, e:
invoc.status = "failed"
invoc.exception = e
- log.exception(e)
+ log.debug("Binding removal failed", exc_info=True)
if queue and exchange:
session = self.app.model.get_session_by_object(binding)
@@ -110,7 +110,7 @@
except Exception, e:
invoc.status = "failed"
invoc.exception = e
- log.exception(e)
+ log.debug("Binding removal failed", exc_info=True)
if queue and exchange:
session = self.app.model.get_session_by_object(binding)
Modified: trunk/cumin/python/cumin/model.py
===================================================================
--- trunk/cumin/python/cumin/model.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/cumin/python/cumin/model.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -668,7 +668,7 @@
remote.get_raw_config(negotiator, prepend+group, sync.get_completion())
except Exception, e:
sync.error = e
- log.exception(e)
+ log.debug("Fetch raw config failed", exc_info=True)
return self.syncs.do_wait()
class Pool(object):
@@ -728,7 +728,7 @@
self.store.update(cursor)
self.store.exception = None
except Exception, e:
- log.exception(e)
+ log.debug("Object store update failed", exc_info=True)
self.store.exception = e
self.ticks += 1
Modified: trunk/cumin/python/cumin/objecttask.py
===================================================================
--- trunk/cumin/python/cumin/objecttask.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/cumin/python/cumin/objecttask.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -99,7 +99,7 @@
invoc.update_time = now
invoc.exception = e
- log.exception(e)
+ log.debug("Exception during task invocation", exc_info=True)
def __str__(self):
return "%s.%s" % (self.__module__, self.__class__.__name__)
Modified: trunk/cumin/python/cumin/qmfadapter.py
===================================================================
--- trunk/cumin/python/cumin/qmfadapter.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/cumin/python/cumin/qmfadapter.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -88,8 +88,8 @@
filtered = [x for x in rows
if compare in x[index]]
rows = filtered
- except Exception, e:
- log.exception(e)
+ except:
+ log.debug("Filtering rows failed", exc_info=True)
return rows
Modified: trunk/cumin/python/cumin/task.py
===================================================================
--- trunk/cumin/python/cumin/task.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/cumin/python/cumin/task.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -108,7 +108,7 @@
invoc.update_time = now
invoc.exception = e
- log.exception(e)
+ log.debug("Exception during task invocation", exc_info=True)
def __str__(self):
return "%s.%s" % (self.__module__, self.__class__.__name__)
Modified: trunk/mint/python/mint/update.py
===================================================================
--- trunk/mint/python/mint/update.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/mint/python/mint/update.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -217,7 +217,7 @@
thread.stats.dropped += 1
except:
- log.exception("Update failed")
+ log.debug("Update failed", exc_info=True)
thread.conn.rollback()
@@ -551,8 +551,8 @@
try:
cursor.execute(text, args)
except:
- log.exception("%s failed", self)
-
+ log.debug("%s failed sql execute", self, exc_info=True)
+ log.error("Sql execute failed")
log.error("Sql text: %s", text)
log.error("Sql values:")
Modified: trunk/mint/python/mint/util.py
===================================================================
--- trunk/mint/python/mint/util.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/mint/python/mint/util.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -50,11 +50,11 @@
def run(self):
while True:
start = time.time()
-
try:
self.process()
except:
- log.exception("Periodic process failed")
+ log.info("Periodic process failed.")
+ log.debug("Periodic process failed", exc_info=True)
elapsed = time.time() - start
delta = self.interval - elapsed
Modified: trunk/rosemary/python/rosemary/sqloperation.py
===================================================================
--- trunk/rosemary/python/rosemary/sqloperation.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/rosemary/python/rosemary/sqloperation.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -27,7 +27,7 @@
try:
cursor.execute(text, values)
except:
- log.exception("%s failed", self)
+ log.debug("%s failed", self, exc_info=True)
self.log_sql(cursor, text, values)
Modified: trunk/sage/python/sage/qmf/qmfoperations.py
===================================================================
--- trunk/sage/python/sage/qmf/qmfoperations.py 2012-02-13 16:26:26 UTC (rev 5217)
+++ trunk/sage/python/sage/qmf/qmfoperations.py 2012-02-13 21:32:10 UTC (rev 5218)
@@ -241,7 +241,7 @@
obj, meth, args)
except Exception, e:
sync.error = e
- log.exception(e)
+ log.debug("QMF method call exception", exc_info=True)
wait(sync.done, timeout=tout)
if not sync.got_data and not sync.error: