From 44831c6b30077527e6cb08fdf2e28d0253902079 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Mon, 22 Nov 2021 10:36:26 -0500 Subject: [PATCH] [+] Add caller info to debug --- src/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils.py b/src/utils.py index f29f409..0f27fd3 100644 --- a/src/utils.py +++ b/src/utils.py @@ -1,4 +1,5 @@ import dataclasses +import inspect import json import os from dataclasses import dataclass @@ -53,7 +54,8 @@ def debug(msg: object) -> None: :param msg: Message """ - print('[DEBUG] ' + str(msg)) + caller = inspect.stack()[1].function + print(f'[DEBUG] {caller}: {msg}') def normalize_directory(directory: str) -> str: