diff options
author | Andrew Michael Stitcher <astitcher@apache.org = astitcher = Andrew Michael Stitcher astitcher@apache.org@apache.org> | 2014-04-14 20:13:31 +0000 |
---|---|---|
committer | Andrew Michael Stitcher <astitcher@apache.org = astitcher = Andrew Michael Stitcher astitcher@apache.org@apache.org> | 2014-04-14 20:13:31 +0000 |
commit | 0e2a4025ea01a187126e656e0cb64eada574f861 (patch) | |
tree | b8be5916e185d2fc62d505ec46eddfc72f27dcfe /qpid/cpp/src/tests/qpid-receive.cpp | |
parent | 2a9abe0c290b9bb7487254302aae2bf6f7fe964d (diff) | |
download | qpid-python-0e2a4025ea01a187126e656e0cb64eada574f861.tar.gz |
NO-JIRA: Make qpid-receive print a bit more info for message headers/content
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1587304 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/qpid-receive.cpp')
-rw-r--r-- | qpid/cpp/src/tests/qpid-receive.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/qpid-receive.cpp b/qpid/cpp/src/tests/qpid-receive.cpp index fb1db05d99..ed0bca11c1 100644 --- a/qpid/cpp/src/tests/qpid-receive.cpp +++ b/qpid/cpp/src/tests/qpid-receive.cpp @@ -232,11 +232,17 @@ int main(int argc, char ** argv) if (msg.getDurable()) std::cout << "Durable: true" << std::endl; if (msg.getRedelivered()) std::cout << "Redelivered: true" << std::endl; std::cout << "Properties: " << msg.getProperties() << std::endl; + if (msg.getContentType().size()) std::cout << "ContentType: " << msg.getContentType() << std::endl; std::cout << std::endl; } if (opts.printContent) { - if (!msg.getContentObject().isVoid()) std::cout << msg.getContentObject() << std::endl; - else std::cout << msg.getContent() << std::endl; + if (!msg.getContentObject().isVoid()) { + std::cout << "[Object: " << getTypeName(msg.getContentObject().getType()) << "]" << std::endl + << msg.getContentObject() << std::endl; + } + else { + std::cout << msg.getContent() << std::endl; + } } if (opts.messages && count >= opts.messages) done = true; } |