added datetime tracking
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import sys
|
||||
import threading
|
||||
from datetime import datetime
|
||||
import utils
|
||||
|
||||
_console_lock = threading.Lock()
|
||||
|
||||
def _log(prefix: str, message: str):
|
||||
time = datetime.now().strftime("[%H:%M:%S]")
|
||||
time = utils.format_datetime("%H:%M:%S")
|
||||
with _console_lock:
|
||||
print(f"{time} {prefix} {message}")
|
||||
print(f"[{time}] {prefix} {message}")
|
||||
|
||||
def info(message: str):
|
||||
_log("INFO", message)
|
||||
|
||||
Reference in New Issue
Block a user