- if (discarded_events_total > 0 && !selected_session->snapshot_mode) {
- MSG("[warning] %" PRIu64 " events discarded, please refer to "
+
+ print_discarded_events = discarded_events_total > 0 &&
+ !selected_session->snapshot_mode;
+ print_lost_packets = lost_packets_total > 0 &&
+ !selected_session->snapshot_mode;
+
+ if (print_discarded_events && print_lost_packets) {
+ ret = asprintf(&stats_str,
+ "Warning: %" PRIu64
+ " events were discarded and %" PRIu64
+ " packets were lost, please refer to "
+ "the documentation on channel configuration.",
+ discarded_events_total, lost_packets_total);
+ } else if (print_discarded_events) {
+ ret = asprintf(&stats_str,
+ "Warning: %" PRIu64
+ " events were discarded, please refer to "