From 5b56f09dbcfa159605268e731c02734486530507 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sat, 1 Jul 2023 05:14:26 +0800 Subject: Replace `info` macro with a less generic name (#15266) --- collectors/ebpf.plugin/ebpf_socket.c | 58 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'collectors/ebpf.plugin/ebpf_socket.c') diff --git a/collectors/ebpf.plugin/ebpf_socket.c b/collectors/ebpf.plugin/ebpf_socket.c index b45dec7d9e..8cb5bf0dde 100644 --- a/collectors/ebpf.plugin/ebpf_socket.c +++ b/collectors/ebpf.plugin/ebpf_socket.c @@ -1844,7 +1844,7 @@ static void fill_last_nv_dimension(netdata_socket_plot_t *ptr, int is_outbound) fill_resolved_name(ptr, hostname, 10 + NETDATA_DOTS_PROTOCOL_COMBINED_LENGTH, service_name, is_outbound); #ifdef NETDATA_INTERNAL_CHECKS - info("Last %s dimension added: ID = %u, IP = OTHER, NAME = %s, DIM1 = %s, DIM2 = %s, DIM3 = %s", + netdata_log_info("Last %s dimension added: ID = %u, IP = OTHER, NAME = %s, DIM1 = %s, DIM2 = %s, DIM3 = %s", (is_outbound)?"outbound":"inbound", network_viewer_opt.max_dim - 1, ptr->resolved_name, ptr->dimension_recv, ptr->dimension_sent, ptr->dimension_retransmit); #endif @@ -1932,7 +1932,7 @@ static void store_socket_inside_avl(netdata_vector_plot_t *out, netdata_socket_t #ifdef NETDATA_INTERNAL_CHECKS char iptext[INET6_ADDRSTRLEN]; if (inet_ntop(family, &w->index.daddr.addr8, iptext, sizeof(iptext))) - info("New %s dimension added: ID = %u, IP = %s, NAME = %s, DIM1 = %s, DIM2 = %s, DIM3 = %s", + netdata_log_info("New %s dimension added: ID = %u, IP = %s, NAME = %s, DIM1 = %s, DIM2 = %s, DIM3 = %s", (out == &inbound_vectors)?"inbound":"outbound", curr, iptext, w->resolved_name, w->dimension_recv, w->dimension_sent, w->dimension_retransmit); #endif @@ -2120,7 +2120,7 @@ void update_listen_table(uint16_t value, uint16_t proto, netdata_passive_connect fill_nv_port_list(w, value, proto, in); #ifdef NETDATA_INTERNAL_CHECKS - info("The network viewer is monitoring inbound connections for port %u", ntohs(value)); + netdata_log_info("The network viewer is monitoring inbound connections for port %u", ntohs(value)); #endif } @@ -3044,14 +3044,14 @@ static inline void fill_port_list(ebpf_network_viewer_port_list_t **out, ebpf_ne uint16_t cmp_last = ntohs(move->last); if (cmp_first <= first && first <= cmp_last && cmp_first <= last && last <= cmp_last ) { - info("The range/value (%u, %u) is inside the range/value (%u, %u) already inserted, it will be ignored.", + netdata_log_info("The range/value (%u, %u) is inside the range/value (%u, %u) already inserted, it will be ignored.", first, last, cmp_first, cmp_last); freez(in->value); freez(in); return; } else if (first <= cmp_first && cmp_first <= last && first <= cmp_last && cmp_last <= last) { - info("The range (%u, %u) is bigger than previous range (%u, %u) already inserted, the previous will be ignored.", + netdata_log_info("The range (%u, %u) is bigger than previous range (%u, %u) already inserted, the previous will be ignored.", first, last, cmp_first, cmp_last); freez(move->value); move->value = in->value; @@ -3071,7 +3071,7 @@ static inline void fill_port_list(ebpf_network_viewer_port_list_t **out, ebpf_ne } #ifdef NETDATA_INTERNAL_CHECKS - info("Adding values %s( %u, %u) to %s port list used on network viewer", + netdata_log_info("Adding values %s( %u, %u) to %s port list used on network viewer", in->value, ntohs(in->first), ntohs(in->last), (*out == network_viewer_opt.included_port)?"included":"excluded"); #endif @@ -3091,7 +3091,7 @@ static void parse_service_list(void **out, char *service) serv = getservbyname((const char *)service, "udp"); if (!serv) { - info("Cannot resolv the service '%s' with protocols TCP and UDP, it will be ignored", service); + netdata_log_info("Cannot resolv the service '%s' with protocols TCP and UDP, it will be ignored", service); return; } @@ -3301,7 +3301,7 @@ void ebpf_fill_ip_list(ebpf_network_viewer_ip_list_t **out, ebpf_network_viewer_ while (move) { if (in->ver == move->ver && ebpf_is_ip_inside_range(&move->first, &move->last, &in->first, &in->last, in->ver)) { - info("The range/value (%s) is inside the range/value (%s) already inserted, it will be ignored.", + netdata_log_info("The range/value (%s) is inside the range/value (%s) already inserted, it will be ignored.", in->value, move->value); freez(in->value); freez(in); @@ -3319,14 +3319,14 @@ void ebpf_fill_ip_list(ebpf_network_viewer_ip_list_t **out, ebpf_network_viewer_ #ifdef NETDATA_INTERNAL_CHECKS char first[256], last[512]; if (in->ver == AF_INET) { - info("Adding values %s: (%u - %u) to %s IP list \"%s\" used on network viewer", + netdata_log_info("Adding values %s: (%u - %u) to %s IP list \"%s\" used on network viewer", in->value, in->first.addr32[0], in->last.addr32[0], (*out == network_viewer_opt.included_ips)?"included":"excluded", table); } else { if (inet_ntop(AF_INET6, in->first.addr8, first, INET6_ADDRSTRLEN) && inet_ntop(AF_INET6, in->last.addr8, last, INET6_ADDRSTRLEN)) - info("Adding values %s - %s to %s IP list \"%s\" used on network viewer", + netdata_log_info("Adding values %s - %s to %s IP list \"%s\" used on network viewer", first, last, (*out == network_viewer_opt.included_ips)?"included":"excluded", table); @@ -3373,7 +3373,7 @@ static void ebpf_parse_ip_list(void **out, char *ip) select = (*end == '/') ? 0 : 1; *end++ = '\0'; if (*end == '!') { - info("The exclusion cannot be in the second part of the range %s, it will be ignored.", ipdup); + netdata_log_info("The exclusion cannot be in the second part of the range %s, it will be ignored.", ipdup); goto cleanipdup; } @@ -3384,7 +3384,7 @@ static void ebpf_parse_ip_list(void **out, char *ip) select = (int) str2i(end); if (select < NETDATA_MINIMUM_IPV4_CIDR || select > NETDATA_MAXIMUM_IPV4_CIDR) { - info("The specified CIDR %s is not valid, the IP %s will be ignored.", end, ip); + netdata_log_info("The specified CIDR %s is not valid, the IP %s will be ignored.", end, ip); goto cleanipdup; } @@ -3400,7 +3400,7 @@ static void ebpf_parse_ip_list(void **out, char *ip) ipv4_convert.s_addr = ipv4_test; char ipv4_msg[INET_ADDRSTRLEN]; if(inet_ntop(AF_INET, &ipv4_convert, ipv4_msg, INET_ADDRSTRLEN)) - info("The network value of CIDR %s was updated for %s .", ipdup, ipv4_msg); + netdata_log_info("The network value of CIDR %s was updated for %s .", ipdup, ipv4_msg); } } else { // Range select = ip2nl(first.addr8, ip, AF_INET, ipdup); @@ -3413,7 +3413,7 @@ static void ebpf_parse_ip_list(void **out, char *ip) } if (htonl(first.addr32[0]) > htonl(last.addr32[0])) { - info("The specified range %s is invalid, the second address is smallest than the first, it will be ignored.", + netdata_log_info("The specified range %s is invalid, the second address is smallest than the first, it will be ignored.", ipdup); goto cleanipdup; } @@ -3427,7 +3427,7 @@ static void ebpf_parse_ip_list(void **out, char *ip) } else if (*end == '-') { *end++ = 0x00; if (*end == '!') { - info("The exclusion cannot be in the second part of the range %s, it will be ignored.", ipdup); + netdata_log_info("The exclusion cannot be in the second part of the range %s, it will be ignored.", ipdup); goto cleanipdup; } @@ -3441,13 +3441,13 @@ static void ebpf_parse_ip_list(void **out, char *ip) } else { // CIDR *end++ = 0x00; if (*end == '!') { - info("The exclusion cannot be in the second part of the range %s, it will be ignored.", ipdup); + netdata_log_info("The exclusion cannot be in the second part of the range %s, it will be ignored.", ipdup); goto cleanipdup; } select = str2i(end); if (select < 0 || select > 128) { - info("The CIDR %s is not valid, the address %s will be ignored.", end, ip); + netdata_log_info("The CIDR %s is not valid, the address %s will be ignored.", end, ip); goto cleanipdup; } @@ -3469,14 +3469,14 @@ static void ebpf_parse_ip_list(void **out, char *ip) char ipv6_msg[INET6_ADDRSTRLEN]; if(inet_ntop(AF_INET6, &ipv6_convert, ipv6_msg, INET6_ADDRSTRLEN)) - info("The network value of CIDR %s was updated for %s .", ipdup, ipv6_msg); + netdata_log_info("The network value of CIDR %s was updated for %s .", ipdup, ipv6_msg); } } if ((be64toh(*(uint64_t *)&first.addr32[2]) > be64toh(*(uint64_t *)&last.addr32[2]) && !memcmp(first.addr32, last.addr32, 2*sizeof(uint32_t))) || (be64toh(*(uint64_t *)&first.addr32) > be64toh(*(uint64_t *)&last.addr32)) ) { - info("The specified range %s is invalid, the second address is smallest than the first, it will be ignored.", + netdata_log_info("The specified range %s is invalid, the second address is smallest than the first, it will be ignored.", ipdup); goto cleanipdup; } @@ -3580,7 +3580,7 @@ static void parse_port_list(void **out, char *range) if (likely(*end)) { *end++ = '\0'; if (*end == '!') { - info("The exclusion cannot be in the second part of the range, the range %s will be ignored.", copied); + netdata_log_info("The exclusion cannot be in the second part of the range, the range %s will be ignored.", copied); freez(copied); return; } @@ -3591,7 +3591,7 @@ static void parse_port_list(void **out, char *range) first = str2i((const char *)range); if (first < NETDATA_MINIMUM_PORT_VALUE || first > NETDATA_MAXIMUM_PORT_VALUE) { - info("The first port %d of the range \"%s\" is invalid and it will be ignored!", first, copied); + netdata_log_info("The first port %d of the range \"%s\" is invalid and it will be ignored!", first, copied); freez(copied); return; } @@ -3600,13 +3600,13 @@ static void parse_port_list(void **out, char *range) last = first; if (last < NETDATA_MINIMUM_PORT_VALUE || last > NETDATA_MAXIMUM_PORT_VALUE) { - info("The second port %d of the range \"%s\" is invalid and the whole range will be ignored!", last, copied); + netdata_log_info("The second port %d of the range \"%s\" is invalid and the whole range will be ignored!", last, copied); freez(copied); return; } if (first > last) { - info("The specified order %s is wrong, the smallest value is always the first, it will be ignored!", copied); + netdata_log_info("The specified order %s is wrong, the smallest value is always the first, it will be ignored!", copied); freez(copied); return; } @@ -3646,7 +3646,7 @@ static void read_max_dimension(struct config *cfg) maxdim /= 2; if (!maxdim) { - info("The number of dimensions is too small (%u), we are setting it to minimum 2", network_viewer_opt.max_dim); + netdata_log_info("The number of dimensions is too small (%u), we are setting it to minimum 2", network_viewer_opt.max_dim); network_viewer_opt.max_dim = 1; return; } @@ -3714,7 +3714,7 @@ static void link_hostname(ebpf_network_viewer_hostname_list_t **out, ebpf_networ ebpf_network_viewer_hostname_list_t *move = *out; for (; move->next ; move = move->next ) { if (move->hash == in->hash && !strcmp(move->value, in->value)) { - info("The hostname %s was already inserted, it will be ignored.", in->value); + netdata_log_info("The hostname %s was already inserted, it will be ignored.", in->value); freez(in->value); simple_pattern_free(in->value_pattern); freez(in); @@ -3727,7 +3727,7 @@ static void link_hostname(ebpf_network_viewer_hostname_list_t **out, ebpf_networ *out = in; } #ifdef NETDATA_INTERNAL_CHECKS - info("Adding value %s to %s hostname list used on network viewer", + netdata_log_info("Adding value %s to %s hostname list used on network viewer", in->value, (*out == network_viewer_opt.included_hostnames)?"included":"excluded"); #endif @@ -3806,7 +3806,7 @@ void parse_network_viewer_section(struct config *cfg) value = appconfig_get(cfg, EBPF_NETWORK_VIEWER_SECTION, EBPF_CONFIG_HOSTNAMES, NULL); link_hostnames(value); } else { - info("Name resolution is disabled, collector will not parser \"hostnames\" list."); + netdata_log_info("Name resolution is disabled, collector will not parser \"hostnames\" list."); } value = appconfig_get(cfg, EBPF_NETWORK_VIEWER_SECTION, @@ -3845,7 +3845,7 @@ static void link_dimension_name(char *port, uint32_t hash, char *value) } else { for (; names->next; names = names->next) { if (names->port == w->port) { - info("Duplicated definition for a service, the name %s will be ignored. ", names->name); + netdata_log_info("Duplicated definition for a service, the name %s will be ignored. ", names->name); freez(names->name); names->name = w->name; names->hash = w->hash; @@ -3857,7 +3857,7 @@ static void link_dimension_name(char *port, uint32_t hash, char *value) } #ifdef NETDATA_INTERNAL_CHECKS - info("Adding values %s( %u) to dimension name list used on network viewer", w->name, htons(w->port)); + netdata_log_info("Adding values %s( %u) to dimension name list used on network viewer", w->name, htons(w->port)); #endif } -- cgit v1.2.3