summaryrefslogtreecommitdiff
path: root/efl/utils
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2016-08-05 19:29:19 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2016-08-05 19:30:26 +0300
commit13ea0cbe1d12d64b88f6269a81c07fcc22fcbe3b (patch)
tree42c8793daacd69944962d6ba1a0666c90accb2b3 /efl/utils
parentf86234dd2570e8afa931e04602d9a2239bbff24f (diff)
Logger: Fix unicode handling with message file and function string parts
Diffstat (limited to 'efl/utils')
-rw-r--r--efl/utils/logger.pyx6
1 files changed, 4 insertions, 2 deletions
diff --git a/efl/utils/logger.pyx b/efl/utils/logger.pyx
index 0fcdd53..5e0a20a 100644
--- a/efl/utils/logger.pyx
+++ b/efl/utils/logger.pyx
@@ -55,16 +55,18 @@ cdef void py_eina_log_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level,
55 const char *fmt, void *data, va_list args) with gil: 55 const char *fmt, void *data, va_list args) with gil:
56 56
57 cdef: 57 cdef:
58 unicode msg, name 58 unicode msg, name, ufile, ufnc
59 object rec, logger 59 object rec, logger
60 60
61 vsprintf(log_buf, fmt, args) 61 vsprintf(log_buf, fmt, args)
62 62
63 msg = log_buf.decode('UTF-8', 'replace') 63 msg = log_buf.decode('UTF-8', 'replace')
64 name = d.name.decode('UTF-8', 'replace') 64 name = d.name.decode('UTF-8', 'replace')
65 ufile = file.decode('UTF-8', 'replace')
66 ufnc = fnc.decode('UTF-8', 'replace')
65 67
66 rec = logging.LogRecord( 68 rec = logging.LogRecord(
67 name, log_levels[level], file, line, msg, None, None, fnc) 69 name, log_levels[level], ufile, line, msg, None, None, ufnc)
68 logger = loggers.get(name, loggers["efl"]) 70 logger = loggers.get(name, loggers["efl"])
69 logger.handle(rec) 71 logger.handle(rec)
70 72