From 3fd12be5e72fc302e0356b33f3bc3195b9c31df7 Mon Sep 17 00:00:00 2001 From: Mike Blume Date: Mon, 16 Sep 2013 10:57:58 -0700 Subject: [PATCH 1/3] move CMD_USAGE nearer parse_options --- configure-syslog.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/configure-syslog.py b/configure-syslog.py index 840c1c7..6ab34e2 100755 --- a/configure-syslog.py +++ b/configure-syslog.py @@ -232,19 +232,6 @@ logger "loggly is better than a bee in your aunt\'s bonnet" '''.strip() -CMD_USAGE = ''' -%prog [option] -Action: -\tinstall Configure the syslog -\tuninstall Remove changes made by the syslog configuration script -\tverify Verify the configuration explicitly -\tsysinfo Print, write system information -\tloggly_help Guideline for users for each step to configure syslog -\tdryrun Perform configuration steps without modifying anything -Option: -\t-v|--verbose Print detailed logs on console -'''.lstrip() - # log priorities... LOG_PRIORITIES = { "emerg": 0, "alert": 1, "crit": 2, "error": 3, @@ -1450,6 +1437,19 @@ def parse_args(self, *args, **kwargs): return options, args +CMD_USAGE = ''' +%prog [option] +Action: +\tinstall Configure the syslog +\tuninstall Remove changes made by the syslog configuration script +\tverify Verify the configuration explicitly +\tsysinfo Print, write system information +\tloggly_help Guideline for users for each step to configure syslog +\tdryrun Perform configuration steps without modifying anything +Option: +\t-v|--verbose Print detailed logs on console +'''.lstrip() + def parse_options(): """ Parse command line argument From f695b874b7176c7468d41a6c548d3768700ccb63 Mon Sep 17 00:00:00 2001 From: Mike Blume Date: Mon, 16 Sep 2013 11:00:43 -0700 Subject: [PATCH 2/3] lose unused verbose option --- configure-syslog.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure-syslog.py b/configure-syslog.py index 6ab34e2..ea4f928 100755 --- a/configure-syslog.py +++ b/configure-syslog.py @@ -1447,7 +1447,6 @@ def parse_args(self, *args, **kwargs): \tloggly_help Guideline for users for each step to configure syslog \tdryrun Perform configuration steps without modifying anything Option: -\t-v|--verbose Print detailed logs on console '''.lstrip() def parse_options(): @@ -1460,8 +1459,6 @@ def parse_options(): choices=('install', 'uninstall', 'verify', 'sysinfo', 'loggly_help', 'dryrun')) parser.add_option("-s", "--subdomain") - parser.add_option("-v", "--verbose", action="store_true", - dest="verbose", default=False) parser.add_option("-a", "--auth") (options, args) = parser.parse_args() return options @@ -1473,7 +1470,6 @@ def main(): options = parse_options() global LOGGLY_QA LOGGLY_QA = os.environ.get('LOGGLY_QA', '').split() - is_printLog = options.verbose version_compatibility_check(MINIMUM_SUPPORTED_PYTHON_VERSION) if options.action == 'loggly_help': From fc9c90650258e269e49f4b194793c398adc03814 Mon Sep 17 00:00:00 2001 From: Mike Blume Date: Mon, 16 Sep 2013 11:04:16 -0700 Subject: [PATCH 3/3] explain 'subdomain' and 'auth' options feel free to rewrite copy, anyone --- configure-syslog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure-syslog.py b/configure-syslog.py index ea4f928..716e67f 100755 --- a/configure-syslog.py +++ b/configure-syslog.py @@ -1447,6 +1447,8 @@ def parse_args(self, *args, **kwargs): \tloggly_help Guideline for users for each step to configure syslog \tdryrun Perform configuration steps without modifying anything Option: +\tsubdomain Name of loggly account being connected to +\tauth Loggly auth token to use for logging '''.lstrip() def parse_options():