+ def trace(self, name, attr = TraceAttr.ALL, block = 512, offset = 0):
+ self.info("Retrieving '%s' trace %s " % (name, attr))
+ if name == 'stdout' :
+ suffix = '.out'
+ elif name == 'stderr' :
+ suffix = '.err'
+ else :
+ suffix = '.misc'
+
+ trace_path = '/tmp/'+ self._topic_app + suffix
+
+ if attr == TraceAttr.PATH:
+ return trace_path
+
+ if attr == TraceAttr.ALL:
+ try:
+ f = open(trace_path ,'r')
+ except IOError:
+ print("File with traces has not been found")
+ return False
+ out = f.read()
+ f.close()
+ return out
+
+