Verified Commit 03cdc932 authored by Grégor JOUET's avatar Grégor JOUET 🔧
Browse files

Make encoding to utf8 for log

parent 6aad7121
Loading
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -3,12 +3,15 @@ import traceback
#TODO use logger

def info(s: str):
    print("[INFO] %s"%s)
    print(encode("[INFO] %s"%s))

def error(s: str, exp: BaseException = None):
    print("[ERROR] %s"%s)
    print(encode("[ERROR] %s"%s))
    if exp != None:
        print(exp)

def warn(s: str):
    print("[WARN] %s"%s)
 No newline at end of file
    print(encode("[WARN] %s"%s))

def encode(s: str):
    return str(s, encoding='utf-8')
 No newline at end of file