aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/log.py
diff options
context:
space:
mode:
Diffstat (limited to 'pathod/log.py')
-rw-r--r--pathod/log.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pathod/log.py b/pathod/log.py
index 1d3ec356..47837101 100644
--- a/pathod/log.py
+++ b/pathod/log.py
@@ -62,7 +62,14 @@ class LogCtx(object):
for line in strutils.hexdump(data):
self("\t%s %s %s" % line)
else:
- for i in strutils.clean_bin(data).split("\n"):
+ data = strutils.native(
+ strutils.escape_control_characters(
+ data
+ .decode("ascii", "replace")
+ .replace(u"\ufffd", u".")
+ )
+ )
+ for i in data.split("\n"):
self("\t%s" % i)
def __call__(self, line):