summaryrefslogtreecommitdiffstats
path: root/registry/registry_db.c
diff options
context:
space:
mode:
Diffstat (limited to 'registry/registry_db.c')
-rw-r--r--registry/registry_db.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/registry/registry_db.c b/registry/registry_db.c
index a5c3956a..448ca29d 100644
--- a/registry/registry_db.c
+++ b/registry/registry_db.c
@@ -112,7 +112,7 @@ int registry_db_save(void) {
if(unlikely(!registry_db_should_be_saved()))
return -2;
- error_log_limit_unlimited();
+ nd_log_limits_unlimited();
char tmp_filename[FILENAME_MAX + 1];
char old_filename[FILENAME_MAX + 1];
@@ -124,7 +124,7 @@ int registry_db_save(void) {
FILE *fp = fopen(tmp_filename, "w");
if(!fp) {
netdata_log_error("REGISTRY: Cannot create file: %s", tmp_filename);
- error_log_limit_reset();
+ nd_log_limits_reset();
return -1;
}
@@ -135,7 +135,7 @@ int registry_db_save(void) {
if(bytes1 < 0) {
netdata_log_error("REGISTRY: Cannot save registry machines - return value %d", bytes1);
fclose(fp);
- error_log_limit_reset();
+ nd_log_limits_reset();
return bytes1;
}
netdata_log_debug(D_REGISTRY, "REGISTRY: saving machines took %d bytes", bytes1);
@@ -145,7 +145,7 @@ int registry_db_save(void) {
if(bytes2 < 0) {
netdata_log_error("REGISTRY: Cannot save registry persons - return value %d", bytes2);
fclose(fp);
- error_log_limit_reset();
+ nd_log_limits_reset();
return bytes2;
}
netdata_log_debug(D_REGISTRY, "REGISTRY: saving persons took %d bytes", bytes2);
@@ -204,7 +204,7 @@ int registry_db_save(void) {
}
// continue operations
- error_log_limit_reset();
+ nd_log_limits_reset();
return -1;
}
@@ -222,7 +222,8 @@ size_t registry_db_load(void) {
netdata_log_debug(D_REGISTRY, "REGISTRY: loading active db from: '%s'", registry.db_filename);
FILE *fp = fopen(registry.db_filename, "r");
if(!fp) {
- netdata_log_error("REGISTRY: cannot open registry file: '%s'", registry.db_filename);
+ if (errno != ENOENT)
+ netdata_log_error("REGISTRY: cannot open registry file: '%s'", registry.db_filename);
return 0;
}