Added ipdb as breakpoint console. Improved logging.

This commit is contained in:
Qubasa
2023-10-18 18:29:10 +02:00
parent 0ab2b853f2
commit 6d0deefa6b
10 changed files with 58 additions and 26 deletions

View File

@@ -4,24 +4,11 @@ import logging
import shlex
from clan_cli import create_parser
from clan_cli.custom_logger import get_caller
log = logging.getLogger(__name__)
def get_caller() -> str:
frame = inspect.currentframe()
if frame is None:
return "unknown"
caller_frame = frame.f_back
if caller_frame is None:
return "unknown"
caller_frame = caller_frame.f_back
if caller_frame is None:
return "unknown"
frame_info = inspect.getframeinfo(caller_frame)
ret = f"{frame_info.filename}:{frame_info.lineno}::{frame_info.function}"
return ret
class Cli:
def __init__(self) -> None: