Logging can give you a very detailed look at the interaction between an application and the broker, which is extremely useful for debugging.
The Qpidd broker and C++ clients can both use environment variables to enable logging. The man page for qpidd lists all available logging options, and shows the corresponding environment variables. (The man page also shows how command line options and configuration files can be used to set logging and other options for the broker.)
In general, use QPID_LOG_ENABLE to set the level of logging you are interested in (trace, debug, info, notice, warning, error, or critical):
export QPID_LOG_ENABLE="warning+"
Use QPID_LOG_OUTPUT to determine where logging output should be sent. This is either a file name or the special values stderr, stdout, or syslog:
export QPID_LOG_OUTPUT="/tmp/myclient.out"