summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2015-09-21 21:11:25 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2015-09-21 21:20:12 +0200
commit0b134db92988114ef2410ea431875ad9b938b7fb (patch)
tree0c7aa96948e6d2454cba8c02dd9df568e4e5450c
parent31a5ce757295e841e72e0149c5851ceace976b44 (diff)
downloadbcfg2-0b134db92988114ef2410ea431875ad9b938b7fb.tar.gz
bcfg2-0b134db92988114ef2410ea431875ad9b938b7fb.tar.bz2
bcfg2-0b134db92988114ef2410ea431875ad9b938b7fb.zip
Logging: Fix message building
The logging.LogRecord instance could contain args to replace some placeholders in the format string in msg.
-rw-r--r--src/lib/Bcfg2/Logger.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Logger.py b/src/lib/Bcfg2/Logger.py
index 11eaeebd1..e5f316a18 100644
--- a/src/lib/Bcfg2/Logger.py
+++ b/src/lib/Bcfg2/Logger.py
@@ -41,6 +41,8 @@ class TermiosFormatter(logging.Formatter):
returns = []
line_len = self.width
if isinstance(record.msg, str):
+ if len(record.args) != 0:
+ record.msg = record.msg % record.args
for line in record.msg.split('\n'):
if len(line) <= line_len:
returns.append(line)