Log new command being registered

This commit is contained in:
Sleepy Monax 2023-11-15 07:50:36 +01:00
parent 7ccd17d64b
commit fc6c503a47

View file

@ -1,4 +1,5 @@
import inspect
import logging
import sys
from pathlib import Path
@ -9,6 +10,8 @@ from . import const, vt100
Value = Union[str, bool, int]
_logger = logging.getLogger(__name__)
class Args:
opts: dict[str, Value]
@ -86,6 +89,7 @@ def command(shortName: Optional[str], longName: str, helpText: str):
calframe = inspect.getouterframes(curframe, 2)
def wrap(fn: Callable[[Args], None]):
_logger.debug(f"Registering command {longName}")
commands.append(
Command(
shortName,