summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-27 07:18:16 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 11:47:05 (GMT)
commitfc46ebed2a45051ce7734b64e137870cc839a92b (patch)
tree38cfa5fa4a733bcdbfaa046e26c805709f676713
parent3cba7cd7077373238c42054868a5a0dae2ace109 (diff)
log: special-case display of callers: needs less output
-rw-r--r--src/log.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/log.py b/src/log.py
index 219cf1d..7aa3062 100644
--- a/src/log.py
+++ b/src/log.py
@@ -82,7 +82,13 @@ def fmt(text, **kwargs):
parts.append(part)
else:
part2 = part.split('{')
- parts.append('%s%s:{%s}' % (part2[0], part2[1], part2[1]))
+ if part2[1] in ('callers'):
+ if part2[0]:
+ parts.append('%s:{%s}' % (part2[0], part2[1]))
+ else:
+ parts.append('{%s}' % part2[1])
+ else:
+ parts.append('%s%s:{%s}' % (part2[0], part2[1], part2[1]))
text = ''.join(parts)
argdict = _getframe(1).f_locals
argdict.update(kwargs)