Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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()
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"),