Loading back/myfab/log.py +6 −3 Original line number Diff line number Diff line Loading @@ -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 Loading
back/myfab/log.py +6 −3 Original line number Diff line number Diff line Loading @@ -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