Merge pull request #546 from simonduq/contrib/rpl-urgent-probing-log

Minor logging changes
This commit is contained in:
George Oikonomou 2018-05-27 17:11:06 +01:00 committed by GitHub
commit d44c32a9b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View File

@ -94,11 +94,12 @@ set_global_address(uip_ipaddr_t *prefix, uip_ipaddr_t *iid)
uip_ds6_addr_add(&root_ipaddr, 0, ADDR_AUTOCONF);
LOG_INFO("IPv6 addresses: ");
LOG_INFO("IPv6 addresses:\n");
for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
state = uip_ds6_if.addr_list[i].state;
if(uip_ds6_if.addr_list[i].isused &&
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
LOG_INFO("-- ");
LOG_INFO_6ADDR(&uip_ds6_if.addr_list[i].ipaddr);
LOG_INFO_("\n");
}

View File

@ -104,7 +104,7 @@ update_state(void)
/* how many more IP neighbors can be have? */
num_free = NBR_TABLE_MAX_NEIGHBORS - num_used;
LOG_INFO("nbr-policy: free: %d, parents: %d\n", num_free, num_parents);
LOG_DBG("nbr-policy: free: %d, parents: %d\n", num_free, num_parents);
}
/*---------------------------------------------------------------------------*/
static const linkaddr_t *
@ -127,12 +127,12 @@ find_removable_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
/* Add the new neighbor only if it is better than the current worst. */
if(dio->rank + curr_instance.min_hoprankinc < worst_rank - curr_instance.min_hoprankinc / 2) {
/* Found *great* neighbor - add! */
LOG_INFO("nbr-policy: DIO rank %u, worse_rank %u -- add to cache\n",
LOG_DBG("nbr-policy: DIO rank %u, worst_rank %u -- add to cache\n",
dio->rank, worst_rank);
return worst_rank_nbr_lladdr;
}
LOG_INFO("nbr-policy: DIO rank %u, worse_rank %u -- do not add to cache\n",
LOG_DBG("nbr-policy: DIO rank %u, worst_rank %u -- do not add to cache\n",
dio->rank, worst_rank);
return NULL;
}

View File

@ -405,9 +405,9 @@ rpl_neighbor_select_best(void)
/* The best is not fresh. Probe it (unless there is already an urgent
probing target). We will be called back after the probing anyway. */
if(curr_instance.dag.urgent_probing_target == NULL) {
LOG_WARN("best parent is not fresh, schedule urgent probing to ");
LOG_WARN_6ADDR(rpl_neighbor_get_ipaddr(best));
LOG_WARN_("\n");
LOG_INFO("best parent is not fresh, schedule urgent probing to ");
LOG_INFO_6ADDR(rpl_neighbor_get_ipaddr(best));
LOG_INFO_("\n");
curr_instance.dag.urgent_probing_target = best;
rpl_schedule_probing_now();
}