Logger: do not fail if the error msg contain invalid chars

now invalid chars are replaced by an "?"
This commit is contained in:
Davide Andreoli 2016-08-05 15:09:06 +02:00
parent 12217e9c2a
commit 283efd1a28
1 changed files with 2 additions and 2 deletions

View File

@ -60,8 +60,8 @@ cdef void py_eina_log_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level,
vsprintf(log_buf, fmt, args)
msg = log_buf.decode("utf-8")
name = d.name.decode("utf-8")
msg = log_buf.decode('UTF-8', 'replace')
name = d.name.decode('UTF-8', 'replace')
rec = logging.LogRecord(
name, log_levels[level], file, line, msg, None, None, fnc)