plugin.py 文件源码

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

项目:pytest-logger 作者: aurzenligl 项目源码 文件源码
def add_loggers(self, loggers, stdout_level=logging.NOTSET, file_level=logging.NOTSET):
        """Adds loggers for stdout/filesystem handling.

        Stdout: loggers will log to stdout only when mentioned in `log` option. If they're
        mentioned without explicit level, `stdout_level` will be used.

        Filesystem: loggers will log to files at `file_level`.

        :arg loggers: List of logger names.

        :arg stdout_level: Default level at which stdout handlers will pass logs.
           By default: `logging.NOTSET`, which means: pass everything.

        :arg file_level: Level at which filesystem handlers will pass logs.
           By default: `logging.NOTSET`, which means: pass everything.
        """
        self._enabled = True
        self._loggers.append((loggers, _sanitize_level(stdout_level), _sanitize_level(file_level)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号