Move timestamps to the end of the log message instead of the beginning. Makes debugging much less of a PITA.

This commit is contained in:
Storm Dragon 2025-04-20 15:27:59 -04:00
parent 0a8bb684ec
commit 5181944de0

View File

@ -298,7 +298,7 @@ def println(level, text="", timestamp=False, stack=False):
text = text.replace("\ufffc", "[OBJ]") text = text.replace("\ufffc", "[OBJ]")
if timestamp: if timestamp:
text = text.replace("\n", f"\n{' ' * 18}") text = text.replace("\n", f"\n{' ' * 18}")
text = f"{datetime.now().strftime('%H:%M:%S.%f')} - {text}" text = f"{text} - {datetime.now().strftime('%H:%M:%S.%f')}"
if stack: if stack:
text += f" {_stackAsString()}" text += f" {_stackAsString()}"