+ if name:
+ log("operation on %s failed. \n %s" %(name, traceback.format_exc()))
+ else:
+ log(traceback.format_exc())
+
+def log_slivers (data):
+ import pprint, time
+ try:
+ f=open(LOG_SLIVERS,'w')
+ now=time.strftime("GetSlivers stored on %Y.%m.%d at %H:%M:%S", time.localtime())
+ f.write(now+'\n')
+ pp=pprint.PrettyPrinter(stream=f,indent=2)
+ pp.pprint(data)
+ f.close()
+ except:
+ log_verbose('Cannot save GetSlivers in %s'%LOG_SLIVERS)