jgdv.logging.decorators
Classes
A Decorator for announcing the entry/exit of a function call |
Module Contents
- class jgdv.logging.decorators.LogCall(
- enter=None,
- exit=None,
- level=logmod.INFO,
- logger=None,
Bases:
jgdv.decorators.DecoratorA Decorator for announcing the entry/exit of a function call
eg: @LogCall(enter=”Entering”, exit=”Exiting”, level=logmod.INFO) def a_func()…
- Parameters:
- _log_msg(msg, fn, args, **kwargs) <Unknown>[source]
- Parameters:
msg (jgdv.Maybe[str | jgdv.Lambda])
args (collections.abc.Iterable)
kwargs (Any)
- Return type:
None
- _wrap_fn(fn) <Unknown>[source]
- Parameters:
fn (collections.abc.Callable[LogCall._wrap_fn.I, LogCall._wrap_fn.O])
- Return type:
collections.abc.Callable[LogCall._wrap_fn.I, LogCall._wrap_fn.O]
- _wrap_method(fn) <Unknown>[source]
- Parameters:
fn (collections.abc.Callable[Concatenate[LogCall._wrap_method.X, LogCall._wrap_method.I], LogCall._wrap_method.O])
- Return type:
collections.abc.Callable[Concatenate[LogCall._wrap_method.X, LogCall._wrap_method.I], LogCall._wrap_method.O]
- _enter_msg = None
- _exit_msg = None
- _logger