kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=7271d53fc04cab113024de0ba823f1ac2b664175
commit 7271d53fc04cab113024de0ba823f1ac2b664175 Author: Kai Huuhko <[email protected]> Date: Thu Nov 28 20:56:37 2013 +0200 Utils.logger: Move log buffer to module space, increase size to 1KB --- efl/utils/logger.pyx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/efl/utils/logger.pyx b/efl/utils/logger.pyx index 22ce861..cd27cc3 100644 --- a/efl/utils/logger.pyx +++ b/efl/utils/logger.pyx @@ -43,17 +43,18 @@ cdef tuple log_levels = ( cdef dict loggers = dict() +cdef char log_buf[1024] + cdef void py_eina_log_print_cb(const_Eina_Log_Domain *d, Eina_Log_Level level, const_char *file, const_char *fnc, int line, const_char *fmt, void *data, va_list args) with gil: cdef: - char tmp[256] - cdef unicode msg - cdef unicode name = d.name.decode("utf-8") + unicode msg + unicode name = d.name.decode("utf-8") - vsprintf(tmp, fmt, args) - msg = tmp.decode("utf-8") + vsprintf(log_buf, fmt, args) + msg = log_buf.decode("utf-8") rec = logging.LogRecord(name, log_levels[level], file, line, msg, None, None, fnc) logger = loggers.get(name, loggers["efl"]) --
