VOL-2215: Errors returned by the BAL APIs bcmolt_*() functions
are not logged
Change-Id: I50c882be6e0b9fceb96778ab144a56b80290d872
diff --git a/agent/src/stats_collection.cc b/agent/src/stats_collection.cc
index e31ce4c..f0feca4 100644
--- a/agent/src/stats_collection.cc
+++ b/agent/src/stats_collection.cc
@@ -125,8 +125,8 @@
port_stats->set_tx_error_packets(nni_stats.data.tx_error_packets);
} else {
- OPENOLT_LOG(ERROR, openolt_log_id, "Failed to retrieve port statistics, intf_id %d, intf_type %d\n",
- (int)intf_ref.intf_id, (int)intf_ref.intf_type);
+ OPENOLT_LOG(ERROR, openolt_log_id, "Failed to retrieve port statistics, intf_id %d, intf_type %d, err = %s\n",
+ (int)intf_ref.intf_id, (int)intf_ref.intf_type, bcmos_strerror(err));
}
break;
}
@@ -146,8 +146,8 @@
port_stats->set_bip_errors(itu_pon_stats.data.bip_errors);
port_stats->set_rx_crc_errors(itu_pon_stats.data.rx_crc_error);
} else {
- OPENOLT_LOG(ERROR, openolt_log_id, "Failed to retrieve port statistics, intf_id %d, intf_type %d, err %d\n",
- (int)intf_ref.intf_id, (int)intf_ref.intf_type, err);
+ OPENOLT_LOG(ERROR, openolt_log_id, "Failed to retrieve port statistics, intf_id %d, intf_type %d, err = %s\n",
+ (int)intf_ref.intf_id, (int)intf_ref.intf_type, bcmos_strerror(err));
}
{
bcmolt_onu_key key;
@@ -164,8 +164,8 @@
port_stats->set_rx_packets(pon_stats.data.rx_packets);
port_stats->set_tx_bytes(pon_stats.data.tx_bytes);
} else {
- OPENOLT_LOG(ERROR, openolt_log_id, "Failed to retrieve port statistics, intf_id %d, intf_type %d, err %d\n",
- (int)intf_ref.intf_id, (int)intf_ref.intf_type, err);
+ OPENOLT_LOG(ERROR, openolt_log_id, "Failed to retrieve port statistics, intf_id %d, intf_type %d, err = %s\n",
+ (int)intf_ref.intf_id, (int)intf_ref.intf_type, bcmos_strerror(err));
}
}
break;