- Timestamp:
- 03/29/12 15:26:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/logging.py
r2323 r2448 56 56 logs = self.logger.pop().strip() 57 57 if len(logs) > 0: 58 print >>sys.stdout, logs 59 sys.stdout.flush() 58 if rcParams['verbose']: 59 print >>sys.stdout, logs 60 if hasattr(sys.stdout, "flush"): 61 sys.stdout.flush() 60 62 self._log = "" 61 63 … … 110 112 level = "INFO" 111 113 try: 112 val = f(*args, **kw) 113 return val 114 except Exception, ex: 115 level = "ERROR" 116 asaplog.push(str(ex)) 117 if rcParams['verbose']: 118 pass 119 else: 120 raise 114 try: 115 val = f(*args, **kw) 116 return val 117 except Exception, ex: 118 level = "ERROR" 119 asaplog.push(str(ex)) 120 if rcParams['verbose']: 121 pass 122 else: 123 raise 121 124 finally: 122 125 asaplog.post(level, f.func_name) 123 #asaplog.post(level, ".".join([f.__module__,f.func_name]))124 126 return wrap_it 125 127
Note:
See TracChangeset
for help on using the changeset viewer.