git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a06b2b3
)
accept logger argument
author
Tony Mack
<tmack@cs.princeton.edu>
Fri, 23 Oct 2009 22:43:25 +0000
(22:43 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Fri, 23 Oct 2009 22:43:25 +0000
(22:43 +0000)
sfa/util/report.py
patch
|
blob
|
history
diff --git
a/sfa/util/report.py
b/sfa/util/report.py
index
28dd79a
..
9a882f0
100644
(file)
--- a/
sfa/util/report.py
+++ b/
sfa/util/report.py
@@
-1,5
+1,11
@@
-def trace(x):
- print x
+def trace(x, logger=None):
+ if logger:
+ logger.info(x)
+ else:
+ print x
-def error(x):
- print x
+def error(x, logger=None):
+ if logger:
+ logger.error(x)
+ else:
+ print x