diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-05-29 13:15:47 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-05-29 13:15:47 +0200 |
commit | 9f86a4c3f20ac8785f80288ec4cdefe79ed67e68 (patch) | |
tree | de8153fb6481096f21bc0056d552571662df0071 /python/astra/log_c.pyx | |
parent | 0f314f9fb219157ed3988ee08e0a8132301105ff (diff) | |
parent | 7a4cfe2e5fe384691f0516020b2fcd48b35a7f63 (diff) | |
download | astra-9f86a4c3f20ac8785f80288ec4cdefe79ed67e68.tar.gz astra-9f86a4c3f20ac8785f80288ec4cdefe79ed67e68.tar.bz2 astra-9f86a4c3f20ac8785f80288ec4cdefe79ed67e68.tar.xz astra-9f86a4c3f20ac8785f80288ec4cdefe79ed67e68.zip |
Merge branch 'master'
Diffstat (limited to 'python/astra/log_c.pyx')
-rw-r--r-- | python/astra/log_c.pyx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/python/astra/log_c.pyx b/python/astra/log_c.pyx index 969cc06..f16329f 100644 --- a/python/astra/log_c.pyx +++ b/python/astra/log_c.pyx @@ -52,16 +52,20 @@ cdef extern from "astra/Logging.h" namespace "astra::CLogger": void setFormatScreen(const char *fmt) def log_debug(sfile, sline, message): - debug(six.b(sfile),sline,six.b(message)) + cstr = list(map(six.b,(sfile,message))) + debug(cstr[0],sline,cstr[1]) def log_info(sfile, sline, message): - info(six.b(sfile),sline,six.b(message)) + cstr = list(map(six.b,(sfile,message))) + info(cstr[0],sline,cstr[1]) def log_warn(sfile, sline, message): - warn(six.b(sfile),sline,six.b(message)) + cstr = list(map(six.b,(sfile,message))) + warn(cstr[0],sline,cstr[1]) def log_error(sfile, sline, message): - error(six.b(sfile),sline,six.b(message)) + cstr = list(map(six.b,(sfile,message))) + error(cstr[0],sline,cstr[1]) def log_enable(): enable() @@ -82,10 +86,12 @@ def log_disableFile(): disableFile() def log_setFormatFile(fmt): - setFormatFile(six.b(fmt)) + cstr = six.b(fmt) + setFormatFile(cstr) def log_setFormatScreen(fmt): - setFormatScreen(six.b(fmt)) + cstr = six.b(fmt) + setFormatScreen(cstr) enumList = [LOG_DEBUG,LOG_INFO,LOG_WARN,LOG_ERROR] @@ -93,4 +99,5 @@ def log_setOutputScreen(fd, level): setOutputScreen(fd, enumList[level]) def log_setOutputFile(filename, level): - setOutputFile(six.b(filename), enumList[level])
\ No newline at end of file + cstr = six.b(filename) + setOutputFile(cstr, enumList[level]) |