Skip to content

Commit 7d043cf

Browse files
pennamfacchinm
authored andcommitted
Gemalto Cinterion: improve trace output
* Do not flood serial monitor with tr_info prints * Align usage of "\n"
1 parent 5e4e79d commit 7d043cf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ nsapi_error_t GEMALTO_CINTERION_CellularContext::do_user_authentication()
141141
return NSAPI_ERROR_AUTH_FAILURE;
142142
}
143143
} else {
144-
tr_info("Empty pwd and username fields: no need for authentication\n");
144+
tr_info("Empty pwd and username fields: no need for authentication");
145145
}
146146

147147
return NSAPI_ERROR_OK;

connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularStack.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,15 @@ nsapi_error_t GEMALTO_CINTERION_CellularStack::gethostbyname(const char *host, S
284284
_at.resp_stop();
285285
if (size > 0) {
286286
//Valid string received
287-
tr_info("Read %d bytes. Valid string: %s\n", size, ipAddress);
287+
tr_info("Read %d bytes. Valid string: %s", size, ipAddress);
288288
// _at.restore_at_timeout();
289289
if (!address->set_ip_address(ipAddress)) {
290290
_at.unlock();
291291
return NSAPI_ERROR_DNS_FAILURE;
292292
}
293293
} else {
294294
//Null string received
295-
tr_info("Read %d bytes. Null string\n", size);
295+
tr_info("Read %d bytes. Null string", size);
296296
return NSAPI_ERROR_NO_ADDRESS;
297297
}
298298
}
@@ -550,7 +550,7 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_recvfrom_impl(Cell
550550
size = UDP_PACKET_SIZE;
551551
}
552552

553-
tr_info("requesting %d bytes\n", size);
553+
tr_debug("requesting %d bytes\n", size);
554554
_at.cmd_start_stop("^SISR", "=", "%d%d", socket->id, size);
555555

556556
sisr_retry:
@@ -574,7 +574,7 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_recvfrom_impl(Cell
574574

575575
nsapi_size_or_error_t len = _at.read_int();
576576
if (len == 0) {
577-
tr_warn("Socket %d no data", socket->id);
577+
tr_debug("Socket %d no data", socket->id);
578578
_at.resp_stop();
579579
RESTORE_URCs_AND_RETURN(NSAPI_ERROR_WOULD_BLOCK);
580580
}

0 commit comments

Comments
 (0)