client.c: show outgoing and received PDUs in log level INFO

coap-client now prints PDUs that are sent and received in log level
INFO so that these are output with '-v6' or higher. These messages
are now visible without turning on the full debug.
This commit is contained in:
Olaf Bergmann committed 2017-08-03 15:24:36 +02:00
1 parent 59f9745c04
commit e77c3565cb
1 file changed
+2 -4
+2 -4
View File
@@ -161,8 +161,6 @@ coap_new_request(coap_context_t *ctx,
debug("cannot add token to request\n");
}
coap_show_pdu(pdu);
if (options) {
/* sort options for delta encoding */
LL_SORT((*options), order_opts);
@@ -332,7 +330,7 @@ message_handler(struct coap_context_t *ctx,
coap_tid_t tid;
#ifndef NDEBUG
if (LOG_DEBUG <= coap_get_log_level()) {
if (LOG_INFO <= coap_get_log_level()) {
debug("** process incoming %d.%02d response:\n",
(received->hdr->code >> 5), received->hdr->code & 0x1F);
coap_show_pdu(received);
@@ -1297,7 +1295,7 @@ main(int argc, char **argv) {
}
#ifndef NDEBUG
if (LOG_DEBUG <= coap_get_log_level()) {
if (LOG_INFO <= coap_get_log_level()) {
debug("sending CoAP request:\n");
coap_show_pdu(pdu);
}