diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-03-11 14:29:17 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-03-11 14:29:17 +0000 |
| commit | 5c70b29392ab7f7252d7923d98616794f6200eab (patch) | |
| tree | 23caf5119ab5bc73530d4d3747ca56ce16838de4 /python/hello-010-world | |
| parent | d38d509af075300441ad858b1bb7680ac6b8e5ca (diff) | |
| download | qpid-python-5c70b29392ab7f7252d7923d98616794f6200eab.tar.gz | |
added convenience API for turning on logging; added logging for controls and commands; made logging prettier
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@635939 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/hello-010-world')
| -rwxr-xr-x | python/hello-010-world | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/python/hello-010-world b/python/hello-010-world index 83e7c87675..a15817cd9d 100755 --- a/python/hello-010-world +++ b/python/hello-010-world @@ -1,18 +1,19 @@ #!/usr/bin/env python -import sys, logging +import sys from qpid.connection010 import Connection from qpid.spec010 import load from qpid.util import connect from qpid.datatypes import Message, RangedSet +from qpid.log import enable, DEBUG, WARN if "-v" in sys.argv: - level = logging.DEBUG + level = DEBUG else: - level = logging.WARN + level = WARN -format = "%(asctime)s %(name)-12s %(levelname)-8s %(message)s" -logging.basicConfig(level=level, format=format, datefmt='%H:%M:%S') +enable("qpid.io.ctl", level) +enable("qpid.io.cmd", level) spec = load("../specs/amqp.0-10.xml") conn = Connection(connect("0.0.0.0", spec.port), spec) |
