Permalink
Browse files

Added basic logging configuration to example programs to avoid a logg…

…ing error message.
  • Loading branch information...
1 parent 8c8857e commit b0c2dfe1fd40e0f8872129864a76b06f6a813eae @brimcfadden brimcfadden committed Jul 15, 2011
@@ -1,4 +1,6 @@
#! /usr/bin/env python
+
+import logging
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -10,6 +12,7 @@ def on_connect():
def callback(msg):
print " [x] Received %r" % msg.body
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
@@ -1,5 +1,6 @@
#! /usr/bin/env python
+import logging
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -15,6 +16,7 @@ def done():
print " [x] Sent 'Hello World!'"
io_loop.stop()
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
@@ -1,5 +1,6 @@
#! /usr/bin/env python
+import logging
import sys
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -17,6 +18,7 @@ def done():
print " [x] Sent %r" % msg.body
io_loop.stop()
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
@@ -1,5 +1,6 @@
#! /usr/bin/env python
+import logging
import time
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -19,6 +20,7 @@ def done(msg):
print " [x] Done"
msg.ack()
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
@@ -1,5 +1,6 @@
#! /usr/bin/env python
+import logging
import sys
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -17,6 +18,7 @@ def done():
print " [x] Sent %r" % msg.body
io_loop.stop()
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
@@ -1,4 +1,6 @@
#! /usr/bin/env python
+
+import logging
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -17,6 +19,7 @@ def with_temp_queue(qinfo):
def callback(msg):
print " [x] %r" % msg.body
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
@@ -1,5 +1,6 @@
#! /usr/bin/env python
+import logging
import sys
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -18,6 +19,7 @@ def done():
print " [x] Sent %r:%r" % (severity, msg.body)
io_loop.stop()
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
@@ -1,4 +1,6 @@
#! /usr/bin/env python
+
+import logging
import sys
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -26,6 +28,7 @@ def with_temp_queue(qinfo):
def callback(msg):
print " [x] %r:%r" % (msg.rx_data.routing_key, msg.body)
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
@@ -1,5 +1,6 @@
#! /usr/bin/env python
+import logging
import sys
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -18,6 +19,7 @@ def done():
print " [x] Sent %r:%r" % (routing_key, msg.body)
io_loop.stop()
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()
@@ -1,4 +1,6 @@
#! /usr/bin/env python
+
+import logging
import sys
from tornado.ioloop import IOLoop
from stormed import Connection, Message
@@ -26,6 +28,7 @@ def with_temp_queue(qinfo):
def callback(msg):
print " [x] %r:%r" % (msg.rx_data.routing_key, msg.body)
+logging.basicConfig()
conn = Connection(host='localhost')
conn.connect(on_connect)
io_loop = IOLoop.instance()

0 comments on commit b0c2dfe

Please sign in to comment.