import inspect
import logging


def get_module_logger(sublogger:str=""):
    """ Return a logger class for the calling module.
    Add a 'sublogger' string to differentiate multiple loggers in a module.
    """
    caller = inspect.getmodulename(inspect.stack()[2][1])
    if caller is None:
        caller = __name__
    return logging.getLogger(f"{caller}.{sublogger}")