summaryrefslogtreecommitdiff
path: root/robusta_krr/utils/configurable.py
diff options
context:
space:
mode:
Diffstat (limited to 'robusta_krr/utils/configurable.py')
-rw-r--r--robusta_krr/utils/configurable.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/robusta_krr/utils/configurable.py b/robusta_krr/utils/configurable.py
index d2f1442..3957e6e 100644
--- a/robusta_krr/utils/configurable.py
+++ b/robusta_krr/utils/configurable.py
@@ -1,4 +1,5 @@
import abc
+from inspect import getframeinfo, stack
from typing import Literal
from rich.console import Console
@@ -51,7 +52,14 @@ class Configurable(abc.ABC):
"""
if self.debug_active:
- self.console.print(self.__add_prefix(message, "[bold green][DEBUG][/bold green]", no_prefix=False))
+ caller = getframeinfo(stack()[1][0])
+ self.console.print(
+ self.__add_prefix(
+ message + f"\t\t({caller.filename}:{caller.lineno})",
+ "[bold green][DEBUG][/bold green]",
+ no_prefix=False,
+ )
+ )
def debug_exception(self) -> None:
"""