diff options
author | Jonathan Robie <jonathan@apache.org> | 2011-01-05 21:48:26 +0000 |
---|---|---|
committer | Jonathan Robie <jonathan@apache.org> | 2011-01-05 21:48:26 +0000 |
commit | 19332a2f30a547c3b7a7b5a58e35b3f03df0c4ef (patch) | |
tree | 380278fde49b5ba84994689532775068200c8776 /tools | |
parent | 5ce4ca34b031d8fc77b8a9f2779ccb8f6d406e77 (diff) | |
download | qpid-python-19332a2f30a547c3b7a7b5a58e35b3f03df0c4ef.tar.gz |
Undo svn commit r1052086.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1055655 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/src/py/qpid-config | 8 | ||||
-rwxr-xr-x | tools/src/py/qpid-printevents | 24 | ||||
-rwxr-xr-x | tools/src/py/qpid-stat | 2 | ||||
-rwxr-xr-x | tools/src/py/qpid-tool | 4 |
4 files changed, 5 insertions, 33 deletions
diff --git a/tools/src/py/qpid-config b/tools/src/py/qpid-config index 27f7d6bbfe..cdbe72baa0 100755 --- a/tools/src/py/qpid-config +++ b/tools/src/py/qpid-config @@ -24,7 +24,6 @@ from optparse import OptionParser, OptionGroup, IndentedHelpFormatter import sys import locale from qmf.console import Session -import qpid.log class Config: def __init__(self): @@ -547,9 +546,6 @@ def YN(bool): def main(argv=None): - - qpid.log.getLogger("qpid.qmf").setLevel(qpid.log.ERROR) - args = OptionsAndArguments(argv) bm = BrokerManager() @@ -595,13 +591,13 @@ def main(argv=None): except KeyboardInterrupt: print except IOError, e: - print "Failed: %s: %s" % (e.__class__.__name__, e) + print e bm.Disconnect() return 1 except SystemExit, e: bm.Disconnect() return 1 - except Exception, e: + except Exception,e: if e.__class__.__name__ != "Timeout": # ignore Timeout exception, handle in the loop below print "Failed: %s: %s" % (e.__class__.__name__, e) diff --git a/tools/src/py/qpid-printevents b/tools/src/py/qpid-printevents index c7f1475ad3..260d0df79d 100755 --- a/tools/src/py/qpid-printevents +++ b/tools/src/py/qpid-printevents @@ -26,7 +26,7 @@ import sys import socket from time import time, strftime, gmtime, sleep from qmf.console import Console, Session -import qpid.log + class EventConsole(Console): def event(self, broker, event): @@ -75,36 +75,16 @@ $ %prog guest/guest@broker-host:10000 """ def main(argv=None): - p = optparse.OptionParser(usage=_usage, description=_description, formatter=JHelpFormatter()) p.add_option("--heartbeats", action="store_true", default=False, help="Use heartbeats.") p.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.") - p.add_option("--require-connection", action="store_true", help="Raise error if connection can not be established. By default, retries connections that could not be established, which allows events to be printed as brokers start and stop.") - p.add_option("--log-level", action="store", choices=["debug", "info", "warn", "error", "critical"], metavar="<level>", help="Logging level for connections") - options, arguments = p.parse_args(args=argv) if len(arguments) == 0: arguments.append("localhost") - LOG_LEVELS = {'debug': qpid.log.DEBUG, - 'info': qpid.log.INFO, - 'warn': qpid.log.WARN, - 'error': qpid.log.ERROR, - 'critical': qpid.log.CRITICAL} - - if options.require_connection: - manageConnections=False - else: - manageConnections=True - - if options.log_level: - qpid.log.getLogger("qpid.qmf").setLevel(LOG_LEVELS[options.log_level]) - else: - qpid.log.getLogger("qpid.qmf").setLevel(qpid.log.ERROR) - console = EventConsole() - session = Session(console, rcvObjects=False, rcvHeartbeats=options.heartbeats, manageConnections=manageConnections) + session = Session(console, rcvObjects=False, rcvHeartbeats=options.heartbeats, manageConnections=True) brokers = [] try: for host in arguments: diff --git a/tools/src/py/qpid-stat b/tools/src/py/qpid-stat index c062126b7d..ce3f5d1ef5 100755 --- a/tools/src/py/qpid-stat +++ b/tools/src/py/qpid-stat @@ -511,7 +511,7 @@ def main(argv=None): return 0 except KeyboardInterrupt: print - except Exception, e: + except Exception,e: print "Failed: %s - %s" % (e.__class__.__name__, e) bm.Disconnect() # try to deallocate brokers diff --git a/tools/src/py/qpid-tool b/tools/src/py/qpid-tool index e5f5657dff..e7c0231b96 100755 --- a/tools/src/py/qpid-tool +++ b/tools/src/py/qpid-tool @@ -30,7 +30,6 @@ from time import strftime, gmtime from qpid.disp import Display from qpid.peer import Closed from qmf.console import Session, Console, SchemaClass, ObjectId -import qpid.log class Mcli(Cmd): """ Management Command Interpreter """ @@ -678,8 +677,6 @@ def Usage(): # Main Program #========================================================= -qpid.log.getLogger("qpid.qmf").setLevel(qpid.log.ERROR) - # Get host name and port if specified on the command line cargs = sys.argv[1:] _host = "localhost" @@ -695,7 +692,6 @@ if _host[0] == '-': disp = Display() - # Attempt to make a connection to the target broker try: data = QmfData(disp, _host) |