logutil.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:aws-ec2rescue-linux 作者: awslabs 项目源码 文件源码
def get_module_logger(cls, mod, logdir):
        """
        Returns a logging.Logger specific to the given module.
        If the logger has not yet been configured, it will be created with default options
        by LogUtil.create_module_logger()

        Parameters:
            mod (Module): module to return a logger for
            logdir (str): the log directory path

        Returns:
            (logger): logging.Logger specific to the given ec2rlcore.module
        """
        if "{}:{}".format(mod.placement, mod.name) not in cls._module_loggers:
            cls.create_module_logger(mod, logdir)

        return logging.getLogger("ec2rl").getChild("module").getChild(mod.placement).getChild(mod.name)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号