summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-02-15 23:47:46 +0000
committerLars Wirzenius <liw@liw.fi>2011-02-15 23:47:46 +0000
commit5354b83cedaad3fb31c22bff65750b01f29bc350 (patch)
treee156cbb8a45d788bcf43a76de281dea19087464d
parent9ec4c1dab031f14041dd363428100136f7079fa3 (diff)
downloadpython-tracing-5354b83cedaad3fb31c22bff65750b01f29bc350.tar.gz
New version with API improvemnt: trace now takes optional arguments
and if given any, they'll be used to format message.
-rw-r--r--debian/changelog7
-rw-r--r--tracing.py3
2 files changed, 9 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 5c1b022..be79af1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-tracing (0.2) squeeze; urgency=low
+
+ * New version with API improvemnt: trace now takes optional arguments
+ and if given any, they'll be used to format message.
+
+ -- Lars Wirzenius <liw@liw.fi> Tue, 15 Feb 2011 23:46:35 +0000
+
python-tracing (0.1) squeeze; urgency=low
* Speed optimization. Don't dig out tracebacks if there are no patterns.
diff --git a/tracing.py b/tracing.py
index efef8e2..4c7eecb 100644
--- a/tracing.py
+++ b/tracing.py
@@ -74,5 +74,6 @@ def trace(msg, *args):
break
if log_it:
filename = os.path.basename(filename)
- msg = msg % args
+ if args:
+ msg = msg % args
logging.debug('%s:%s:%s: %s' % (filename, lineno, funcname, msg))