qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonat...@apache.org
Subject svn commit: r1055655 - in /qpid/trunk/qpid: extras/qmf/src/py/qmf/console.py tools/src/py/qpid-config tools/src/py/qpid-printevents tools/src/py/qpid-stat tools/src/py/qpid-tool
Date Wed, 05 Jan 2011 21:48:27 GMT
Author: jonathan
Date: Wed Jan  5 21:48:26 2011
New Revision: 1055655

URL: http://svn.apache.org/viewvc?rev=1055655&view=rev
Log:
Undo svn commit r1052086.

Modified:
    qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py
    qpid/trunk/qpid/tools/src/py/qpid-config
    qpid/trunk/qpid/tools/src/py/qpid-printevents
    qpid/trunk/qpid/tools/src/py/qpid-stat
    qpid/trunk/qpid/tools/src/py/qpid-tool

Modified: qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py?rev=1055655&r1=1055654&r2=1055655&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py (original)
+++ qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py Wed Jan  5 21:48:26 2011
@@ -39,8 +39,8 @@ from Queue           import Queue, Empty
 from time            import time, strftime, gmtime, sleep
 from cStringIO       import StringIO
 
-import qpid.log
-qpid.log.enable(name="qpid.qmf")
+#import qpid.log
+#qpid.log.enable(name="qpid.io.cmd", level=qpid.log.DEBUG)
 
 #===================================================================================================
 # CONSOLE
@@ -2509,14 +2509,6 @@ class Broker(Thread):
 
     except Exception, e:
       self.error = "Exception during connection setup: %s - %s" % (e.__class__.__name__,
e)
-
-      log = qpid.log.getLogger("qpid.qmf")
-      
-      if e[0] == -2:
-          log.warning("Could not connect to broker " + self.host + ":" + str(self.port) +
" " + str(e))
-      else:
-          log.error("Could not connect to broker " + self.host + ":" + str(self.port) + "
" + str(e))
-
       self.conn_exc = e
       return False     # connection failed
 

Modified: qpid/trunk/qpid/tools/src/py/qpid-config
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-config?rev=1055655&r1=1055654&r2=1055655&view=diff
==============================================================================
--- qpid/trunk/qpid/tools/src/py/qpid-config (original)
+++ qpid/trunk/qpid/tools/src/py/qpid-config Wed Jan  5 21:48:26 2011
@@ -24,7 +24,6 @@ from optparse import OptionParser, Optio
 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)

Modified: qpid/trunk/qpid/tools/src/py/qpid-printevents
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-printevents?rev=1055655&r1=1055654&r2=1055655&view=diff
==============================================================================
--- qpid/trunk/qpid/tools/src/py/qpid-printevents (original)
+++ qpid/trunk/qpid/tools/src/py/qpid-printevents Wed Jan  5 21:48:26 2011
@@ -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:

Modified: qpid/trunk/qpid/tools/src/py/qpid-stat
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-stat?rev=1055655&r1=1055654&r2=1055655&view=diff
==============================================================================
--- qpid/trunk/qpid/tools/src/py/qpid-stat (original)
+++ qpid/trunk/qpid/tools/src/py/qpid-stat Wed Jan  5 21:48:26 2011
@@ -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

Modified: qpid/trunk/qpid/tools/src/py/qpid-tool
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-tool?rev=1055655&r1=1055654&r2=1055655&view=diff
==============================================================================
--- qpid/trunk/qpid/tools/src/py/qpid-tool (original)
+++ qpid/trunk/qpid/tools/src/py/qpid-tool Wed Jan  5 21:48:26 2011
@@ -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)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message