Merge pull request #325 from npetrangelo/patch-3

Update __init__.py
This commit is contained in:
markqvist 2023-06-22 20:05:37 +02:00 committed by GitHub
commit 6d551578c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ def timestamp_str(time_s):
def log(msg, level=3, _override_destination = False): def log(msg, level=3, _override_destination = False):
global _always_override_destination, compact_log_fmt global _always_override_destination, compact_log_fmt
msg = str(msg)
if loglevel >= level: if loglevel >= level:
if not compact_log_fmt: if not compact_log_fmt:
logstring = "["+timestamp_str(time.time())+"] ["+loglevelname(level)+"] "+msg logstring = "["+timestamp_str(time.time())+"] ["+loglevelname(level)+"] "+msg
@ -238,4 +238,4 @@ def panic():
def exit(): def exit():
print("") print("")
sys.exit(0) sys.exit(0)