import logging


def create_caplog(caplog):
    """Set global test logging levels."""

    def _level(level=logging.INFO):
        caplog.set_level(level, logger="aiocrontab.core")
        return caplog

    return _level