LEVELS = {
    "NOTSET": 0,
    "DEBUG": 10,
    "INFO": 20,
    "WARN": 30,
    "WARNING": 30,
    "ERROR": 40,
    "FATAL": 50,
    "CRITICAL": 50
}


def Logger(name: str, level: int=LEVELS["DEBUG"], **kwargs) -> ...:
    import logging
    logging.basicConfig(
        format=kwargs.get(
            "format",
            "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
        ),
        level=level
    )
    return logging.getLogger(name)

@@ -1,243 +1,161 @@
-LEVELS = %7B%0A    %22NOTSET%22: 0,%0A    %22DEBUG%22: 10,%0A    %22INFO%22: 20,%0A    %22WARN%22: 30,%0A    %22WARNING%22: 30,%0A    %22ERROR%22: 40,%0A    %22FATAL%22: 50,%0A    %22CRITICAL%22: 50%0A%7D%0A%0A%0Adef Logger(name: str, level: int=LEVELS%5B%22DEBUG%22%5D, **kwargs) -%3E ...:%0A    import logging
+import logging%0Afrom collections import Callable%0Afrom functools import wraps%0A%0A%0Adef Logger(name: str, level: int=logging.INFO, **kwargs) -%3E logging.RootLogger:
 %0A   
@@ -198,19 +198,19 @@
 =kwargs.
-get
+pop
 (%0A      
@@ -364,8 +364,741 @@
 r(name)%0A
+%0A%0Adef log(func: Callable, level: int=logging.DEBUG, **kwargs) -%3E Callable:%0A    %22%22%22 Log function entering, arguments and exiting (to debug) %22%22%22%0A    logger = Logger(%0A        %22%7B%7D::%7B%7D%22.format(func.__module__, func.__name__),%0A        level,%0A        **kwargs%0A    )%0A    with_args = kwargs.pop(%22with_args%22, True)%0A%0A    @wraps(func)%0A    def wrapper(*args, **kwargs) -%3E object:%0A        logger.debug(%22Entering: %25s%22, func.__name__)%0A        if with_args:%0A            for arg in args:%0A                logger.debug(arg)%0A            for key, value in kwargs.items():%0A                logger.debug(%22%25s = %25s%22, key, value)%0A        result = func(*args, **kwargs)%0A        logger.debug(%22Exiting: %25s%22, func.__name__)%0A        return result%0A    return wrapper%0A

improve Logger, add log decorator to debug