-
Notifications
You must be signed in to change notification settings - Fork 0
HelperObjectsDocs
This file contains documentation for classes that are objects intended to make development simpler. They are not intended for inheritance but to use as a part of your toolbox when creating Features with CommandIntegrator.
The @logger decorator above your methods allows simple, pragmatic and unified logging across your tech stack.
It is a closure, also referred to as a wrapper method which will automatically log the arguments, keyword arguments and return of your method, including logging errors as ERROR log level if errors are encountered during the method execution.
from CommandIntegrator.logger import logger
@logger
def add_ints(a: int, b: int) -> int:
return a + b
s = add_ints(a = 4, b = 4)
2020-04-02 09:41:32,185:DEBUG:CI Logger: Ran method "add" in __main__ with ARGS: () & KWARGS: {a: 4, b: 4} & RETURN: 8
Documentation will be written shortly.
CommandIntegrator Wiki