How to use the daiquiri.set_default_log_levels function in daiquiri

To help you get started, we’ve selected a few daiquiri examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Mergifyio / mergify-engine / mergify_engine / utils.py View on Github external
if config.LOG_JSON_FILE:
        outputs.append(
            daiquiri.output.TimedRotatingFile(
                filename=config.LOG_JSON_FILE,
                level=logging.DEBUG,
                interval=datetime.timedelta(seconds=5),
                backup_count=48,
                formatter=daiquiri.formatter.JSON_FORMATTER,
            )
        )

    daiquiri.setup(
        outputs=outputs, level=(logging.DEBUG if config.DEBUG else logging.INFO),
    )
    daiquiri.set_default_log_levels(
        [
            ("celery", "INFO"),
            ("kombu", "WARN"),
            ("github.Requester", "WARN"),
            ("urllib3.connectionpool", "WARN"),
            ("vcr", "WARN"),
        ]
    )

    config.log()
github sileht / pastamaker / pastamaker / utils.py View on Github external
def setup_logging():
    daiquiri.setup(
        outputs=[daiquiri.output.Stream(
            sys.stdout,
            formatter=daiquiri.formatter.ColorFormatter(
                "%(asctime)s [%(process)d] %(color)s%(levelname)-8.8s "
                "%(name)s: %(message)s%(color_stop)s"),
        )],
        level=(logging.DEBUG if config.DEBUG else logging.INFO),
    )
    daiquiri.set_default_log_levels([
        ("rq", "ERROR"),
        # ("github.Requester", "DEBUG"),