adding MiniLog and MiniLogSentry classes. Use these to capture a complex process and print the result when complete.

This commit is contained in:
Josh Wilson 2007-12-07 22:32:37 +00:00
parent 0058ff9756
commit 1d9814f00c
1 changed files with 2 additions and 7 deletions

View File

@ -3139,13 +3139,8 @@ class MiniLog:
('*'*50, self.name, '-'*50, '\n'.join(self.lines), '*'*50)
def enterFunction(self, funcName, *args, **kw):
if args:
rArgs = [args[0].__class__.__name__ + ', ']
else:
rArgs = []
rArgs += [`x`+', ' for x in args[1:]] + \
[ x + ' = ' + '%s, ' % `y` for x,y in kw.items()]
rArgs = [`x`+', ' for x in args] + \
[ x + ' = ' + '%s, ' % `y` for x,y in kw.items()]
if not rArgs:
rArgs = '()'