summaryrefslogtreecommitdiffstats
path: root/libnetdata
diff options
context:
space:
mode:
Diffstat (limited to 'libnetdata')
-rw-r--r--libnetdata/adaptive_resortable_list/adaptive_resortable_list.c8
-rw-r--r--libnetdata/adaptive_resortable_list/adaptive_resortable_list.h2
-rw-r--r--libnetdata/aral/aral.c6
-rw-r--r--libnetdata/clocks/clocks.c4
-rw-r--r--libnetdata/config/appconfig.c2
-rw-r--r--libnetdata/ebpf/ebpf.c16
-rw-r--r--libnetdata/json/json.c4
-rw-r--r--libnetdata/libnetdata.c16
-rw-r--r--libnetdata/log/log.c2
-rw-r--r--libnetdata/log/log.h2
-rw-r--r--libnetdata/onewayalloc/onewayalloc.c2
-rw-r--r--libnetdata/popen/popen.c6
-rw-r--r--libnetdata/procfile/procfile.c6
-rw-r--r--libnetdata/socket/security.c6
-rw-r--r--libnetdata/socket/socket.c24
-rw-r--r--libnetdata/storage_number/storage_number.c6
-rw-r--r--libnetdata/threads/threads.c10
17 files changed, 61 insertions, 61 deletions
diff --git a/libnetdata/adaptive_resortable_list/adaptive_resortable_list.c b/libnetdata/adaptive_resortable_list/adaptive_resortable_list.c
index 6332fa174d..b645927d44 100644
--- a/libnetdata/adaptive_resortable_list/adaptive_resortable_list.c
+++ b/libnetdata/adaptive_resortable_list/adaptive_resortable_list.c
@@ -78,16 +78,16 @@ void arl_begin(ARL_BASE *base) {
// do these checks after the ARL has been sorted
if(unlikely(base->relinkings > (base->expected + base->allocated)))
- info("ARL '%s' has %zu relinkings with %zu expected and %zu allocated entries. Is the source changing so fast?"
+ netdata_log_info("ARL '%s' has %zu relinkings with %zu expected and %zu allocated entries. Is the source changing so fast?"
, base->name, base->relinkings, base->expected, base->allocated);
if(unlikely(base->slow > base->fast))
- info("ARL '%s' has %zu fast searches and %zu slow searches. Is the source really changing so fast?"
+ netdata_log_info("ARL '%s' has %zu fast searches and %zu slow searches. Is the source really changing so fast?"
, base->name, base->fast, base->slow);
/*
if(unlikely(base->iteration % 60 == 0)) {
- info("ARL '%s' statistics: iteration %zu, expected %zu, wanted %zu, allocated %zu, fred %zu, relinkings %zu, found %zu, added %zu, fast %zu, slow %zu"
+ netdata_log_info("ARL '%s' statistics: iteration %zu, expected %zu, wanted %zu, allocated %zu, fred %zu, relinkings %zu, found %zu, added %zu, fast %zu, slow %zu"
, base->name
, base->iteration
, base->expected
@@ -242,7 +242,7 @@ int arl_find_or_create_and_relink(ARL_BASE *base, const char *s, const char *val
#ifdef NETDATA_INTERNAL_CHECKS
if(unlikely(base->iteration % 60 == 0 && e->flags & ARL_ENTRY_FLAG_FOUND))
- info("ARL '%s': entry '%s' is already found. Did you forget to call arl_begin()?", base->name, s);
+ netdata_log_info("ARL '%s': entry '%s' is already found. Did you forget to call arl_begin()?", base->name, s);
#endif
e->flags |= ARL_ENTRY_FLAG_FOUND;
diff --git a/libnetdata/adaptive_resortable_list/adaptive_resortable_list.h b/libnetdata/adaptive_resortable_list/adaptive_resortable_list.h
index 294c52e81b..bca0ff272c 100644
--- a/libnetdata/adaptive_resortable_list/adaptive_resortable_list.h
+++ b/libnetdata/adaptive_resortable_list/adaptive_resortable_list.h
@@ -94,7 +94,7 @@ static inline int arl_check(ARL_BASE *base, const char *keyword, const char *val
#ifdef NETDATA_INTERNAL_CHECKS
if(unlikely((base->fast + base->slow) % (base->expected + base->allocated) == 0 && (base->fast + base->slow) > (base->expected + base->allocated) * base->iteration))
- info("ARL '%s': Did you forget to call arl_begin()?", base->name);
+ netdata_log_info("ARL '%s': Did you forget to call arl_begin()?", base->name);
#endif
// it should be the first entry (pointed by base->next_keyword)
diff --git a/libnetdata/aral/aral.c b/libnetdata/aral/aral.c
index 73ec89ad08..823df40598 100644
--- a/libnetdata/aral/aral.c
+++ b/libnetdata/aral/aral.c
@@ -192,7 +192,7 @@ static void aral_delete_leftover_files(const char *name, const char *path, const
continue;
snprintfz(full_path, FILENAME_MAX, "%s/%s", path, de->d_name);
- info("ARAL: '%s' removing left-over file '%s'", name, full_path);
+ netdata_log_info("ARAL: '%s' removing left-over file '%s'", name, full_path);
if(unlikely(unlink(full_path) == -1))
error("ARAL: '%s' cannot delete file '%s'", name, full_path);
}
@@ -756,7 +756,7 @@ ARAL *aral_create(const char *name, size_t element_size, size_t initial_page_ele
ar->config.name, ar->config.requested_element_size, sizeof(uintptr_t), ARAL_NATURAL_ALIGNMENT,
ar->config.element_size, ar->config.page_ptr_offset);
- //info("ARAL: element size %zu, sizeof(uintptr_t) %zu, natural alignment %zu, final element size %zu, page_ptr_offset %zu",
+ //netdata_log_info("ARAL: element size %zu, sizeof(uintptr_t) %zu, natural alignment %zu, final element size %zu, page_ptr_offset %zu",
// ar->element_size, sizeof(uintptr_t), ARAL_NATURAL_ALIGNMENT, ar->internal.element_size, ar->internal.page_ptr_offset);
@@ -1056,7 +1056,7 @@ int aral_stress_test(size_t threads, size_t elements, size_t seconds) {
__atomic_add_fetch(&auc.errors, 1, __ATOMIC_RELAXED);
}
- info("ARAL: did %zu malloc, %zu free, "
+ netdata_log_info("ARAL: did %zu malloc, %zu free, "
"using %zu threads, in %llu usecs",
auc.ar->aral_lock.user_malloc_operations,
auc.ar->aral_lock.user_free_operations,
diff --git a/libnetdata/clocks/clocks.c b/libnetdata/clocks/clocks.c
index 19c66f0a5a..4a178b320d 100644
--- a/libnetdata/clocks/clocks.c
+++ b/libnetdata/clocks/clocks.c
@@ -433,11 +433,11 @@ inline collected_number uptime_msec(char *filename){
if(delta <= 1000 && uptime_boottime != 0) {
procfile_close(read_proc_uptime_ff);
- info("Using now_boottime_usec() for uptime (dt is %lld ms)", delta);
+ netdata_log_info("Using now_boottime_usec() for uptime (dt is %lld ms)", delta);
use_boottime = 1;
}
else if(uptime_proc != 0) {
- info("Using /proc/uptime for uptime (dt is %lld ms)", delta);
+ netdata_log_info("Using /proc/uptime for uptime (dt is %lld ms)", delta);
use_boottime = 0;
}
else {
diff --git a/libnetdata/config/appconfig.c b/libnetdata/config/appconfig.c
index d346da85f4..37b8d7c7d0 100644
--- a/libnetdata/config/appconfig.c
+++ b/libnetdata/config/appconfig.c
@@ -653,7 +653,7 @@ int appconfig_load(struct config *root, char *filename, int overwrite_used, cons
FILE *fp = fopen(filename, "r");
if(!fp) {
- // info("CONFIG: cannot open file '%s'. Using internal defaults.", filename);
+ // netdata_log_info("CONFIG: cannot open file '%s'. Using internal defaults.", filename);
return 0;
}
diff --git a/libnetdata/ebpf/ebpf.c b/libnetdata/ebpf/ebpf.c
index b980d09eda..a66b5998a9 100644
--- a/libnetdata/ebpf/ebpf.c
+++ b/libnetdata/ebpf/ebpf.c
@@ -183,7 +183,7 @@ static int kernel_is_rejected()
if (read_file("/proc/version", version_string, VERSION_STRING_LEN)) {
struct utsname uname_buf;
if (!uname(&uname_buf)) {
- info("Cannot check kernel version");
+ netdata_log_info("Cannot check kernel version");
return 0;
}
version_string_len =
@@ -230,7 +230,7 @@ static int kernel_is_rejected()
while ((reject_string_len = getline(&reject_string, &buf_len, kernel_reject_list) - 1) > 0) {
if (version_string_len >= reject_string_len) {
if (!strncmp(version_string, reject_string, reject_string_len)) {
- info("A buggy kernel is detected");
+ netdata_log_info("A buggy kernel is detected");
fclose(kernel_reject_list);
freez(reject_string);
return 1;
@@ -496,7 +496,7 @@ void ebpf_update_kernel_memory(ebpf_plugin_stats_t *report, ebpf_local_maps_t *m
report->memlock_kern += memsize;
report->hash_tables += 1;
#ifdef NETDATA_DEV_MODE
- info("Hash table %u: %s (FD = %d) is consuming %lu bytes totalizing %lu bytes",
+ netdata_log_info("Hash table %u: %s (FD = %d) is consuming %lu bytes totalizing %lu bytes",
report->hash_tables, map->name, map->map_fd, memsize, report->memlock_kern);
#endif
break;
@@ -505,7 +505,7 @@ void ebpf_update_kernel_memory(ebpf_plugin_stats_t *report, ebpf_local_maps_t *m
report->memlock_kern -= memsize;
report->hash_tables -= 1;
#ifdef NETDATA_DEV_MODE
- info("Hash table %s (FD = %d) was removed releasing %lu bytes, now we have %u tables loaded totalizing %lu bytes.",
+ netdata_log_info("Hash table %s (FD = %d) was removed releasing %lu bytes, now we have %u tables loaded totalizing %lu bytes.",
map->name, map->map_fd, memsize, report->hash_tables, report->memlock_kern);
#endif
break;
@@ -570,7 +570,7 @@ void ebpf_update_map_size(struct bpf_map *map, ebpf_local_maps_t *lmap, ebpf_mod
if (lmap->user_input && lmap->user_input != lmap->internal_input) {
define_size = lmap->internal_input;
#ifdef NETDATA_INTERNAL_CHECKS
- info("Changing map %s from size %u to %u ", map_name, lmap->internal_input, lmap->user_input);
+ netdata_log_info("Changing map %s from size %u to %u ", map_name, lmap->internal_input, lmap->user_input);
#endif
} else if (((lmap->type & apps_type) == apps_type) && (!em->apps_charts) && (!em->cgroup_charts)) {
lmap->user_input = ND_EBPF_DEFAULT_MIN_PID;
@@ -878,7 +878,7 @@ struct bpf_link **ebpf_load_program(char *plugins_dir, ebpf_module_t *em, int kv
size_t count_programs = ebpf_count_programs(*obj);
#ifdef NETDATA_INTERNAL_CHECKS
- info("eBPF program %s loaded with success!", lpath);
+ netdata_log_info("eBPF program %s loaded with success!", lpath);
#endif
return ebpf_attach_programs(*obj, count_programs, em->names);
@@ -1107,7 +1107,7 @@ struct btf *ebpf_load_btf_file(char *path, char *filename)
snprintfz(fullpath, PATH_MAX, "%s/%s", path, filename);
struct btf *ret = ebpf_parse_btf_file(fullpath);
if (!ret)
- info("Your environment does not have BTF file %s/%s. The plugin will work with 'legacy' code.",
+ netdata_log_info("Your environment does not have BTF file %s/%s. The plugin will work with 'legacy' code.",
path, filename);
return ret;
@@ -1259,7 +1259,7 @@ void ebpf_update_module_using_config(ebpf_module_t *modules, netdata_ebpf_load_m
modules->maps_per_core = CONFIG_BOOLEAN_NO;
#ifdef NETDATA_DEV_MODE
- info("The thread %s was configured with: mode = %s; update every = %d; apps = %s; cgroup = %s; ebpf type format = %s; ebpf co-re tracing = %s; collect pid = %s; maps per core = %s",
+ netdata_log_info("The thread %s was configured with: mode = %s; update every = %d; apps = %s; cgroup = %s; ebpf type format = %s; ebpf co-re tracing = %s; collect pid = %s; maps per core = %s",
modules->thread_name,
load_mode,
modules->update_every,
diff --git a/libnetdata/json/json.c b/libnetdata/json/json.c
index 532b677ceb..a4c4fc3047 100644
--- a/libnetdata/json/json.c
+++ b/libnetdata/json/json.c
@@ -124,7 +124,7 @@ int json_callback_print(JSON_ENTRY *e)
buffer_strcat(wb,"NULL");
break;
}
- info("JSON: %s", buffer_tostring(wb));
+ netdata_log_info("JSON: %s", buffer_tostring(wb));
buffer_free(wb);
return 0;
}
@@ -323,7 +323,7 @@ size_t json_walk_array(char *js, jsmntok_t *t, size_t nest, size_t start, JSON_E
for(i = 0; i < size ; i++) {
ne.pos = i;
if (strlen(e->name) > JSON_NAME_LEN - 24 || strlen(e->fullname) > JSON_FULLNAME_LEN -24) {
- info("JSON: JSON walk_array ignoring element with name:%s fullname:%s",e->name, e->fullname);
+ netdata_log_info("JSON: JSON walk_array ignoring element with name:%s fullname:%s",e->name, e->fullname);
continue;
}
snprintfz(ne.name, JSON_NAME_LEN, "%s[%lu]", e->name, i);
diff --git a/libnetdata/libnetdata.c b/libnetdata/libnetdata.c
index 8439902393..84878a118c 100644
--- a/libnetdata/libnetdata.c
+++ b/libnetdata/libnetdata.c
@@ -1043,7 +1043,7 @@ void netdata_fix_chart_id(char *s) {
}
static int memory_file_open(const char *filename, size_t size) {
- // info("memory_file_open('%s', %zu", filename, size);
+ // netdata_log_info("memory_file_open('%s', %zu", filename, size);
int fd = open(filename, O_RDWR | O_CREAT | O_NOATIME, 0664);
if (fd != -1) {
@@ -1127,7 +1127,7 @@ inline int madvise_mergeable(void *mem __maybe_unused, size_t len __maybe_unused
void *netdata_mmap(const char *filename, size_t size, int flags, int ksm, bool read_only, int *open_fd)
{
- // info("netdata_mmap('%s', %zu", filename, size);
+ // netdata_log_info("netdata_mmap('%s', %zu", filename, size);
// MAP_SHARED is used in memory mode map
// MAP_PRIVATE is used in memory mode ram and save
@@ -1177,9 +1177,9 @@ void *netdata_mmap(const char *filename, size_t size, int flags, int ksm, bool r
if(fd != -1 && fd_for_mmap == -1) {
if (lseek(fd, 0, SEEK_SET) == 0) {
if (read(fd, mem, size) != (ssize_t) size)
- info("Cannot read from file '%s'", filename);
+ netdata_log_info("Cannot read from file '%s'", filename);
}
- else info("Cannot seek to beginning of file '%s'.", filename);
+ else netdata_log_info("Cannot seek to beginning of file '%s'.", filename);
}
// madvise_sequential(mem, size);
@@ -1321,14 +1321,14 @@ int recursively_delete_dir(const char *path, const char *reason) {
continue;
}
- info("Deleting %s file '%s'", reason?reason:"", fullpath);
+ netdata_log_info("Deleting %s file '%s'", reason?reason:"", fullpath);
if(unlikely(unlink(fullpath) == -1))
error("Cannot delete %s file '%s'", reason?reason:"", fullpath);
else
ret++;
}
- info("Deleting empty directory '%s'", path);
+ netdata_log_info("Deleting empty directory '%s'", path);
if(unlikely(rmdir(path) == -1))
error("Cannot delete empty directory '%s'", path);
else
@@ -1399,7 +1399,7 @@ int verify_netdata_host_prefix() {
goto failed;
if(netdata_configured_host_prefix && *netdata_configured_host_prefix)
- info("Using host prefix directory '%s'", netdata_configured_host_prefix);
+ netdata_log_info("Using host prefix directory '%s'", netdata_configured_host_prefix);
return 0;
@@ -1921,7 +1921,7 @@ void timing_action(TIMING_ACTION action, TIMING_STEP step) {
);
}
- info("TIMINGS REPORT:\n%sTIMINGS REPORT: total # %10zu, t %11.2f ms",
+ netdata_log_info("TIMINGS REPORT:\n%sTIMINGS REPORT: total # %10zu, t %11.2f ms",
buffer_tostring(wb), total_reqs, (double)total_usec / USEC_PER_MS);
memcpy(timings2, timings3, sizeof(timings2));
diff --git a/libnetdata/log/log.c b/libnetdata/log/log.c
index 6832d628d4..b3d8cbc20c 100644
--- a/libnetdata/log/log.c
+++ b/libnetdata/log/log.c
@@ -555,7 +555,7 @@ static FILE *open_log_file(int fd, FILE *fp, const char *filename, int *enabled_
if(fd_ptr) *fd_ptr = fd;
return fp;
}
- // info("dup2() new fd %d to old fd %d for '%s'", f, fd, filename);
+ // netdata_log_info("dup2() new fd %d to old fd %d for '%s'", f, fd, filename);
close(f);
}
else fd = f;
diff --git a/libnetdata/log/log.h b/libnetdata/log/log.h
index 3d9f0927db..8c14650406 100644
--- a/libnetdata/log/log.h
+++ b/libnetdata/log/log.h
@@ -118,7 +118,7 @@ typedef struct error_with_limit {
#define internal_fatal(args...) debug_dummy()
#endif
-#define info(args...) info_int(0, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define netdata_log_info(args...) info_int(0, __FILE__, __FUNCTION__, __LINE__, ##args)
#define collector_info(args...) info_int(1, __FILE__, __FUNCTION__, __LINE__, ##args)
#define infoerr(args...) error_int(0, "INFO", __FILE__, __FUNCTION__, __LINE__, ##args)
#define error(args...) error_int(0, "ERROR", __FILE__, __FUNCTION__, __LINE__, ##args)
diff --git a/libnetdata/onewayalloc/onewayalloc.c b/libnetdata/onewayalloc/onewayalloc.c
index 489ce73d7e..9c6a916803 100644
--- a/libnetdata/onewayalloc/onewayalloc.c
+++ b/libnetdata/onewayalloc/onewayalloc.c
@@ -195,7 +195,7 @@ void onewayalloc_destroy(ONEWAYALLOC *owa) {
OWA_PAGE *head = (OWA_PAGE *)owa;
- //info("OWA: %zu allocations of %zu total bytes, in %zu pages of %zu total bytes",
+ //netdata_log_info("OWA: %zu allocations of %zu total bytes, in %zu pages of %zu total bytes",
// head->stats_mallocs_made, head->stats_mallocs_size,
// head->stats_pages, head->stats_pages_size);
diff --git a/libnetdata/popen/popen.c b/libnetdata/popen/popen.c
index 783c74a51f..d21b481ae2 100644
--- a/libnetdata/popen/popen.c
+++ b/libnetdata/popen/popen.c
@@ -140,7 +140,7 @@ static int popene_internal(volatile pid_t *pidptr, char **env, uint8_t flags, FI
// create a string to be logged about the command we are running
char command_to_be_logged[2048];
convert_argv_to_string(command_to_be_logged, sizeof(command_to_be_logged), spawn_argv);
- // info("custom_popene() running command: %s", command_to_be_logged);
+ // netdata_log_info("custom_popene() running command: %s", command_to_be_logged);
int ret = 0; // success by default
int attr_rc = 1; // failure by default
@@ -406,11 +406,11 @@ int netdata_pclose(FILE *fp_child_input, FILE *fp_child_output, pid_t pid) {
case CLD_KILLED:
if(info.si_status == SIGTERM) {
- info("child pid %d killed by SIGTERM", info.si_pid);
+ netdata_log_info("child pid %d killed by SIGTERM", info.si_pid);
return(0);
}
else if(info.si_status == SIGPIPE) {
- info("child pid %d killed by SIGPIPE.", info.si_pid);
+ netdata_log_info("child pid %d killed by SIGPIPE.", info.si_pid);
return(0);
}
else {
diff --git a/libnetdata/procfile/procfile.c b/libnetdata/procfile/procfile.c
index cdf0f97239..a73a9e2533 100644
--- a/libnetdata/procfile/procfile.c
+++ b/libnetdata/procfile/procfile.c
@@ -410,7 +410,7 @@ procfile *procfile_open(const char *filename, const char *separators, uint32_t f
return NULL;
}
- // info("PROCFILE: opened '%s' on fd %d", filename, fd);
+ // netdata_log_info("PROCFILE: opened '%s' on fd %d", filename, fd);
size_t size = (unlikely(procfile_adaptive_initial_allocation)) ? procfile_max_allocation : PROCFILE_INCREMENT_BUFFER;
procfile *ff = mallocz(sizeof(procfile) + size);
@@ -435,7 +435,7 @@ procfile *procfile_reopen(procfile *ff, const char *filename, const char *separa
if(unlikely(!ff)) return procfile_open(filename, separators, flags);
if(likely(ff->fd != -1)) {
- // info("PROCFILE: closing fd %d", ff->fd);
+ // netdata_log_info("PROCFILE: closing fd %d", ff->fd);
close(ff->fd);
}
@@ -445,7 +445,7 @@ procfile *procfile_reopen(procfile *ff, const char *filename, const char *separa
return NULL;
}
- // info("PROCFILE: opened '%s' on fd %d", filename, ff->fd);
+ // netdata_log_info("PROCFILE: opened '%s' on fd %d", filename, ff->fd);
//strncpyz(ff->filename, filename, FILENAME_MAX);
freez(ff->filename);
diff --git a/libnetdata/socket/security.c b/libnetdata/socket/security.c
index fe7e5cbaf6..72eb939210 100644
--- a/libnetdata/socket/security.c
+++ b/libnetdata/socket/security.c
@@ -585,7 +585,7 @@ void netdata_ssl_initialize_ctx(int selector) {
if(!netdata_ssl_web_server_ctx) {
struct stat statbuf;
if (stat(netdata_ssl_security_key, &statbuf) || stat(netdata_ssl_security_cert, &statbuf))
- info("To use encryption it is necessary to set \"ssl certificate\" and \"ssl key\" in [web] !\n");
+ netdata_log_info("To use encryption it is necessary to set \"ssl certificate\" and \"ssl key\" in [web] !\n");
else {
netdata_ssl_web_server_ctx = netdata_ssl_create_server_ctx(
SSL_MODE_ENABLE_PARTIAL_WRITE |
@@ -705,13 +705,13 @@ int ssl_security_location_for_context(SSL_CTX *ctx, char *file, char *path) {
int load_custom = 1, load_default = 1;
if (file || path) {
if(!SSL_CTX_load_verify_locations(ctx, file, path)) {
- info("Netdata can not verify custom CAfile or CApath for parent's SSL certificate, so it will use the default OpenSSL configuration to validate certificates!");
+ netdata_log_info("Netdata can not verify custom CAfile or CApath for parent's SSL certificate, so it will use the default OpenSSL configuration to validate certificates!");
load_custom = 0;
}
}
if(!SSL_CTX_set_default_verify_paths(ctx)) {
- info("Can not verify default OpenSSL configuration to validate certificates!");
+ netdata_log_info("Can not verify default OpenSSL configuration to validate certificates!");
load_default = 0;
}
diff --git a/libnetdata/socket/socket.c b/libnetdata/socket/socket.c
index f52aa9c815..22e4e0a221 100644
--- a/libnetdata/socket/socket.c
+++ b/libnetdata/socket/socket.c
@@ -588,7 +588,7 @@ static inline int bind_to_this(LISTEN_SOCKETS *sockets, const char *definition,
struct sockaddr_in *sin = (struct sockaddr_in *) rp->ai_addr;
inet_ntop(AF_INET, &sin->sin_addr, rip, INET_ADDRSTRLEN);
rport = ntohs(sin->sin_port);
- // info("Attempting to listen on IPv4 '%s' ('%s'), port %d ('%s'), socktype %d", rip, ip, rport, port, socktype);
+ // netdata_log_info("Attempting to listen on IPv4 '%s' ('%s'), port %d ('%s'), socktype %d", rip, ip, rport, port, socktype);
fd = create_listen_socket4(socktype, rip, rport, listen_backlog);
break;
}
@@ -597,7 +597,7 @@ static inline int bind_to_this(LISTEN_SOCKETS *sockets, const char *definition,
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) rp->ai_addr;
inet_ntop(AF_INET6, &sin6->sin6_addr, rip, INET6_ADDRSTRLEN);
rport = ntohs(sin6->sin6_port);
- // info("Attempting to listen on IPv6 '%s' ('%s'), port %d ('%s'), socktype %d", rip, ip, rport, port, socktype);
+ // netdata_log_info("Attempting to listen on IPv6 '%s' ('%s'), port %d ('%s'), socktype %d", rip, ip, rport, port, socktype);
fd = create_listen_socket6(socktype, scope_id, rip, rport, listen_backlog);
break;
}
@@ -660,7 +660,7 @@ int listen_sockets_setup(LISTEN_SOCKETS *sockets) {
if(sockets->failed) {
size_t i;
for(i = 0; i < sockets->opened ;i++)
- info("LISTENER: Listen socket %s opened successfully.", sockets->fds_names[i]);
+ netdata_log_info("LISTENER: Listen socket %s opened successfully.", sockets->fds_names[i]);
}
return (int)sockets->opened;
@@ -810,7 +810,7 @@ int connect_to_this_ip46(int protocol, int socktype, const char *host, uint32_t
errno = 0;
if(connect(fd, ai->ai_addr, ai->ai_addrlen) < 0) {
if(errno == EALREADY || errno == EINPROGRESS) {
- info("Waiting for connection to ip %s port %s to be established", hostBfr, servBfr);
+ netdata_log_info("Waiting for connection to ip %s port %s to be established", hostBfr, servBfr);
// Convert 'struct timeval' to milliseconds for poll():
int timeout_milliseconds = timeout->tv_sec * 1000 + timeout->tv_usec / 1000;
@@ -824,7 +824,7 @@ int connect_to_this_ip46(int protocol, int socktype, const char *host, uint32_t
// poll() completed normally. We can check the revents to see what happened
if (fds[0].revents & POLLOUT) {
// connect() completed successfully, socket is writable.
- info("connect() to ip %s port %s completed successfully", hostBfr, servBfr);
+ netdata_log_info("connect() to ip %s port %s completed successfully", hostBfr, servBfr);
}
else {
// This means that the socket is in error. We will close it and set fd to -1
@@ -1349,7 +1349,7 @@ inline POLLINFO *poll_add_fd(POLLJOB *p
if(unlikely(fd < 0)) return NULL;
//if(p->limit && p->used >= p->limit) {
- // info("Max sockets limit reached (%zu sockets), dropping connection", p->used);
+ // netdata_log_info("Max sockets limit reached (%zu sockets), dropping connection", p->used);
// close(fd);
// return NULL;
//}
@@ -1533,7 +1533,7 @@ int poll_default_rcv_callback(POLLINFO *pi, short int *events) {
}
} else if (rc) {
// data received
- info("POLLFD: internal error: poll_default_rcv_callback() is discarding %zd bytes received on socket %d", rc, pi->fd);
+ netdata_log_info("POLLFD: internal error: poll_default_rcv_callback() is discarding %zd bytes received on socket %d", rc, pi->fd);
}
} while (rc != -1);
@@ -1543,7 +1543,7 @@ int poll_default_rcv_callback(POLLINFO *pi, short int *events) {
int poll_default_snd_callback(POLLINFO *pi, short int *events) {
*events &= ~POLLOUT;
- info("POLLFD: internal error: poll_default_snd_callback(): nothing to send on socket %d", pi->fd);
+ netdata_log_info("POLLFD: internal error: poll_default_snd_callback(): nothing to send on socket %d", pi->fd);
return 0;
}
@@ -1773,7 +1773,7 @@ void poll_events(LISTEN_SOCKETS *sockets
);
pi->data = data;
- info("POLLFD: LISTENER: listening on '%s'", (sockets->fds_names[i])?sockets->fds_names[i]:"UNKNOWN");
+ netdata_log_info("POLLFD: LISTENER: listening on '%s'", (sockets->fds_names[i])?sockets->fds_names[i]:"UNKNOWN");
}
int listen_sockets_active = 1;
@@ -1814,7 +1814,7 @@ void poll_events(LISTEN_SOCKETS *sockets
// enable or disable the TCP listening sockets, based on the current number of sockets used and the limit set
if((listen_sockets_active && (p.limit && p.used >= p.limit)) || (!listen_sockets_active && (!p.limit || p.used < p.limit))) {
listen_sockets_active = !listen_sockets_active;
- info("%s listening sockets (used TCP sockets %zu, max allowed for this worker %zu)", (listen_sockets_active)?"ENABLING":"DISABLING", p.used, p.limit);
+ netdata_log_info("%s listening sockets (used TCP sockets %zu, max allowed for this worker %zu)", (listen_sockets_active)?"ENABLING":"DISABLING", p.used, p.limit);
for (i = 0; i <= p.max; i++) {
if(p.inf[i].flags & POLLINFO_FLAG_SERVER_SOCKET && p.inf[i].socktype == SOCK_STREAM) {
p.fds[i].events = (short int) ((listen_sockets_active) ? POLLIN : 0);
@@ -1962,7 +1962,7 @@ void poll_events(LISTEN_SOCKETS *sockets
if(likely(pi->flags & POLLINFO_FLAG_CLIENT_SOCKET)) {
if (unlikely(pi->send_count == 0 && p.complete_request_timeout > 0 && (now - pi->connected_t) >= p.complete_request_timeout)) {
- info("POLLFD: LISTENER: client slot %zu (fd %d) from %s port %s has not sent a complete request in %zu seconds - closing it. "
+ netdata_log_info("POLLFD: LISTENER: client slot %zu (fd %d) from %s port %s has not sent a complete request in %zu seconds - closing it. "
, i
, pi->fd
, pi->client_ip ? pi->client_ip : "<undefined-ip>"
@@ -1972,7 +1972,7 @@ void poll_events(LISTEN_SOCKETS *sockets
poll_close_fd(pi);
}
else if(unlikely(pi->recv_count && p.idle_timeout > 0 && now - ((pi->last_received_t > pi->last_sent_t) ? pi->last_received_t : pi->last_sent_t) >= p.idle_timeout )) {
- info("POLLFD: LISTENER: client slot %zu (fd %d) from %s port %s is idle for more than %zu seconds - closing it. "
+ netdata_log_info("POLLFD: LISTENER: client slot %zu (fd %d) from %s port %s is idle for more than %zu seconds - closing it. "
, i
, pi->fd
, pi->client_ip ? pi->client_ip : "<undefined-ip>"
diff --git a/libnetdata/storage_number/storage_number.c b/libnetdata/storage_number/storage_number.c
index ebae71d815..ca1eb43aab 100644
--- a/libnetdata/storage_number/storage_number.c
+++ b/libnetdata/storage_number/storage_number.c
@@ -52,7 +52,7 @@ bool is_system_ieee754_double(void) {
if(*ptr != tests[i].i && (tests[i].original == tests[i].d || (isnan(tests[i].original) && isnan(tests[i].d)))) {
if(!logged)
- info("IEEE754: test #%zu, value " NETDATA_DOUBLE_FORMAT_G " is represented in this system as %lX, but it was expected as %lX",
+ netdata_log_info("IEEE754: test #%zu, value " NETDATA_DOUBLE_FORMAT_G " is represented in this system as %lX, but it was expected as %lX",
i+1, tests[i].original, *ptr, tests[i].i);
errors++;
}
@@ -60,14 +60,14 @@ bool is_system_ieee754_double(void) {
if(!errors && sizeof(NETDATA_DOUBLE) == sizeof(uint64_t)) {
if(!logged)
- info("IEEE754: system is using IEEE754 DOUBLE PRECISION values");
+ netdata_log_info("IEEE754: system is using IEEE754 DOUBLE PRECISION values");
logged = true;
return true;
}
else {
if(!logged)
- info("IEEE754: system is NOT compatible with IEEE754 DOUBLE PRECISION values");
+ netdata_log_info("IEEE754: system is NOT compatible with IEEE754 DOUBLE PRECISION values");
logged = true;
return false;
diff --git a/libnetdata/threads/threads.c b/libnetdata/threads/threads.c
index a4591d5ac3..5b1adb0e88 100644
--- a/libnetdata/threads/threads.c
+++ b/libnetdata/threads/threads.c
@@ -152,7 +152,7 @@ void netdata_threads_init_after_fork(size_t stacksize) {
if(i != 0)
error("pthread_attr_setstacksize() to %zu bytes, failed with code %d.", stacksize, i);
else
- info("Set threads stack size to %zu bytes", stacksize);
+ netdata_log_info("Set threads stack size to %zu bytes", stacksize);
}
else
error("Invalid pthread stacksize %zu", stacksize);
@@ -173,7 +173,7 @@ static void thread_cleanup(void *ptr) {
}
if(!(netdata_thread->options & NETDATA_THREAD_OPTION_DONT_LOG_CLEANUP))
- info("thread with task id %d finished", gettid());
+ netdata_log_info("thread with task id %d finished", gettid());
sender_thread_buffer_free();
rrdset_thread_rda_free();
@@ -207,7 +207,7 @@ static void thread_set_name_np(NETDATA_THREAD *nt) {
if (ret != 0)
error("cannot set pthread name of %d to %s. ErrCode: %d", gettid(), threadname, ret);
else
- info("set name of thread %d to %s", gettid(), threadname);
+ netdata_log_info("set name of thread %d to %s", gettid(), threadname);
}
}
@@ -230,7 +230,7 @@ void uv_thread_set_name_np(uv_thread_t ut, const char* name) {
thread_name_get(true);
if (ret)
- info("cannot set libuv thread name to %s. Err: %d", threadname, ret);
+ netdata_log_info("cannot set libuv thread name to %s. Err: %d", threadname, ret);
}
void os_thread_get_current_name_np(char threadname[NETDATA_THREAD_NAME_MAX + 1])
@@ -247,7 +247,7 @@ static void *netdata_thread_init(void *ptr) {
netdata_thread = (NETDATA_THREAD *)ptr;
if(!(netdata_thread->options & NETDATA_THREAD_OPTION_DONT_LOG_STARTUP))
- info("thread created with task id %d", gettid());
+ netdata_log_info("thread created with task id %d", gettid());
if(pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) != 0)
error("cannot set pthread cancel type to DEFERRED.");