From 002e1526c4ebab86cb972f7696c30382921dd034 Mon Sep 17 00:00:00 2001 From: Jonathan Harker Date: Sun, 3 Aug 2014 14:48:59 -0700 Subject: [PATCH] Fix logging format In change-id I9f415038ed716f89a3d95b5e102458b815947dec an incomplete logging format was added resulting in the log messages no longer being logged. This corrects the issue by appending the log message to the log-line format. Change-Id: I7dd12b92cb366c7ed3f65adac089aca7143d813d --- jeepyb/cmd/close_pull_requests.py | 3 ++- jeepyb/cmd/manage_projects.py | 9 ++++++--- jeepyb/cmd/welcome_message.py | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/jeepyb/cmd/close_pull_requests.py b/jeepyb/cmd/close_pull_requests.py index 720fa10..232291e 100644 --- a/jeepyb/cmd/close_pull_requests.py +++ b/jeepyb/cmd/close_pull_requests.py @@ -57,7 +57,8 @@ instructions there to upload your change to Gerrit. def main(): logging.basicConfig(level=logging.ERROR, - format='%(asctime)-6s: %(name)s - %(levelname)s') + format='%(asctime)-6s: %(name)s - %(levelname)s' + ' - %(message)s') GITHUB_SECURE_CONFIG = os.environ.get('GITHUB_SECURE_CONFIG', '/etc/github/github.secure.config') diff --git a/jeepyb/cmd/manage_projects.py b/jeepyb/cmd/manage_projects.py index eeb175f..9991729 100644 --- a/jeepyb/cmd/manage_projects.py +++ b/jeepyb/cmd/manage_projects.py @@ -529,13 +529,16 @@ def main(): if args.debug: logging.basicConfig(level=logging.DEBUG, - format='%(asctime)-6s: %(name)s - %(levelname)s') + format='%(asctime)-6s: %(name)s - %(levelname)s' + ' - %(message)s') elif args.verbose: logging.basicConfig(level=logging.INFO, - format='%(asctime)-6s: %(name)s - %(levelname)s') + format='%(asctime)-6s: %(name)s - %(levelname)s' + ' - %(message)s') else: logging.basicConfig(level=logging.ERROR, - format='%(asctime)-6s: %(name)s - %(levelname)s') + format='%(asctime)-6s: %(name)s - %(levelname)s' + ' - %(message)s') default_has_github = registry.get_defaults('has-github', True) diff --git a/jeepyb/cmd/welcome_message.py b/jeepyb/cmd/welcome_message.py index cf525a8..456c4ea 100644 --- a/jeepyb/cmd/welcome_message.py +++ b/jeepyb/cmd/welcome_message.py @@ -157,10 +157,12 @@ def main(): if args.verbose: logging.basicConfig(level=logging.DEBUG, - format='%(asctime)-6s: %(name)s - %(levelname)s') + format='%(asctime)-6s: %(name)s - %(levelname)s' + ' - %(message)s') else: logging.basicConfig(level=logging.ERROR, - format='%(asctime)-6s: %(name)s - %(levelname)s') + format='%(asctime)-6s: %(name)s - %(levelname)s' + ' - %(message)s') # they're a first-timer, post the message on 1st patchset if is_newbie(args.uploader) and args.patchset == '1' and not args.dryrun: