Added a time code.

This commit is contained in:
The Wobbler 2025-03-26 14:50:13 +01:00
parent 1487575015
commit a199e5b099

View file

@ -1,6 +1,8 @@
#!/usr/bin/python3
from os import PathLike
import time
from .format import format_string
_msg_types_ncl = { # message types without colors
@ -108,7 +110,9 @@ class Log:
else:
formatted_msg = _msg_types_ncl[msg_type] + msg
formatted_msg = prefix + formatted_msg
time_code = time.strftime("[%d/%m/%Y|%H:%M:%S %z]")
formatted_msg = prefix + time_code + formatted_msg
return formatted_msg