diff --git a/logs.py b/logs.py index 179c4f4..8e2be33 100644 --- a/logs.py +++ b/logs.py @@ -4,12 +4,14 @@ from sys import stdout, stderr def log( - message: str, origin: str = "Unknown", level: str = "LOG", time: dt = dt.now() + message: str, origin: str = "Unknown", level: str = "LOG", time: dt = "now" ) -> None: if level == "EXIT": stream = stderr else: stream = stdout + if time == "now": + dt.now() if not "\n" in message: print(f"[{level}][{origin}][{time}] {message}") else: