summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-27 16:37:47 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 06:41:36 (GMT)
commit56f2a5ceff1eba197aea49c4ab78f7aa00844884 (patch)
tree733b63e442c3b1e0b3e8997d902a6dfa3771b059
parentb6f1e2e3f7ca1dcdd8190d1c24e966d6ca1f0b2e (diff)
log.fmt: _hideXXX variable names are not shown in output
-rw-r--r--src/log.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/log.py b/src/log.py
index fe980ed..b087baa 100644
--- a/src/log.py
+++ b/src/log.py
@@ -88,7 +88,12 @@ def fmt(text, **kwargs):
else:
parts.append('{%s}' % part2[1])
else:
- parts.append('%s%s:{%s}' % (part2[0], part2[1], part2[1]))
+ showName = part2[1] + ':'
+ if showName.startswith('_hide'):
+ showName = ''
+ if showName.startswith('self.'):
+ showName = showName[5:]
+ parts.append('%s%s{%s}' % (part2[0], showName, part2[1]))
text = ''.join(parts)
argdict = _getframe(1).f_locals
argdict.update(kwargs)