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:
parent
0a8bb684ec
commit
5181944de0
@ -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()}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user