Commit 90491b9
committed
logging: Stringify message in StepFormatter
The usage of StepFormatter could provide errors:
self = <labgrid.logging.StepFormatter object at 0x7f63fdc59010>
record = <LogRecord: foo, 30, .../test_logger.py, 10, "{1: 2}">
def format(self, record):
old_msg = record.msg
try:
if self.indent:
if hasattr(record, "indent_level"):
self.indent_level = record.indent_level
> record.msg = (" " * self.indent_level) + record.msg
E TypeError: can only concatenate str (not "dict") to str
if a message isn't a string.
Change-Id: I0f5187dcd9389ff486aac2f7e0e029ecaa323825
Signed-off-by: Roman Kuznecov <[email protected]>1 parent 6d8febb commit 90491b9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments