From 1cedcbfa38a3e3022a1f214f6123963643a4e9d6 Mon Sep 17 00:00:00 2001 From: sidpremkumar Date: Oct 28 2019 14:28:47 +0000 Subject: Remove annoying fedmsg warning logs --- diff --git a/sync2jira/main.py b/sync2jira/main.py index ec00743..dab17bf 100644 --- a/sync2jira/main.py +++ b/sync2jira/main.py @@ -36,6 +36,11 @@ from sync2jira.mailer import send_mail log = logging.getLogger('sync2jira.main') + +# Only allow fedmsg logs that are critical +fedmsg_log = logging.getLogger('fedmsg.crypto.utils') +fedmsg_log.setLevel(50) + remote_link_title = "Upstream issue" failure_email_subject = "Sync2Jira Has Failed!" @@ -132,7 +137,7 @@ def listen(config): if suffix not in handlers: continue - log.info(" Handling %r %r %r", suffix, topic, idx) + log.debug(" Handling %r %r %r", suffix, topic, idx) if 'pagure' in suffix: issue = u.handle_pagure_message(msg, config) @@ -184,6 +189,7 @@ def main(): :return: Nothing """ + # Load config and disable warnings config = load_config() logging.basicConfig(level=logging.INFO) warnings.simplefilter("ignore") diff --git a/sync2jira/upstream.py b/sync2jira/upstream.py index 948ba06..7a9d235 100644 --- a/sync2jira/upstream.py +++ b/sync2jira/upstream.py @@ -51,7 +51,7 @@ def handle_github_message(msg, config): mapped_repos = config['sync2jira']['map']['github'] if upstream not in mapped_repos: - log.info("%r not in github map: %r", upstream, mapped_repos.keys()) + log.debug("%r not in github map: %r", upstream, mapped_repos.keys()) return None _filter = config['sync2jira']\ @@ -152,7 +152,7 @@ def handle_pagure_message(msg, config): mapped_repos = config['sync2jira']['map']['pagure'] if upstream not in mapped_repos: - log.info("%r not in pagure map: %r", upstream, mapped_repos.keys()) + log.debug("%r not in pagure map: %r", upstream, mapped_repos.keys()) return None _filter = config['sync2jira']\ @@ -229,7 +229,7 @@ def pagure_issues(upstream, config): .get('filters', {})\ .get('pagure', {}) \ .get(upstream, {}) - + response = requests.get(url, params=params) if not bool(response): try: