diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2023-07-06 15:46:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-06 15:46:48 +0000 |
commit | e0f388c43f3144abb871cce2a7b44e85a36de48f (patch) | |
tree | cf41e5ae11ae7d0ad5ec0b49f5f4ac4531189eb3 /exporting | |
parent | 3cc220ff5e38ef5cd96a64596c7e0c370d0fa074 (diff) |
Rename generic `error` function (#15296)
Diffstat (limited to 'exporting')
-rw-r--r-- | exporting/aws_kinesis/aws_kinesis.c | 14 | ||||
-rw-r--r-- | exporting/exporting_engine.c | 2 | ||||
-rw-r--r-- | exporting/exporting_engine.h | 2 | ||||
-rw-r--r-- | exporting/graphite/graphite.c | 2 | ||||
-rw-r--r-- | exporting/init_connectors.c | 12 | ||||
-rw-r--r-- | exporting/json/json.c | 2 | ||||
-rw-r--r-- | exporting/mongodb/mongodb.c | 24 | ||||
-rw-r--r-- | exporting/opentsdb/opentsdb.c | 4 | ||||
-rw-r--r-- | exporting/process_data.c | 18 | ||||
-rw-r--r-- | exporting/prometheus/remote_write/remote_write.c | 4 | ||||
-rw-r--r-- | exporting/pubsub/pubsub.c | 12 | ||||
-rw-r--r-- | exporting/read_config.c | 12 | ||||
-rw-r--r-- | exporting/send_data.c | 12 |
13 files changed, 62 insertions, 58 deletions
diff --git a/exporting/aws_kinesis/aws_kinesis.c b/exporting/aws_kinesis/aws_kinesis.c index 9aa7e1aa1a..c3e99951a8 100644 --- a/exporting/aws_kinesis/aws_kinesis.c +++ b/exporting/aws_kinesis/aws_kinesis.c @@ -54,7 +54,8 @@ int init_aws_kinesis_instance(struct instance *instance) instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { - error("EXPORTING: cannot create buffer for AWS Kinesis exporting connector instance %s", instance->config.name); + netdata_log_error("EXPORTING: cannot create buffer for AWS Kinesis exporting connector instance %s", + instance->config.name); return 1; } if (uv_mutex_init(&instance->mutex)) @@ -72,7 +73,7 @@ int init_aws_kinesis_instance(struct instance *instance) instance->connector_specific_data = (void *)connector_specific_data; if (!strcmp(connector_specific_config->stream_name, "")) { - error("stream name is a mandatory Kinesis parameter but it is not configured"); + netdata_log_error("stream name is a mandatory Kinesis parameter but it is not configured"); return 1; } @@ -174,10 +175,11 @@ void aws_kinesis_connector_worker(void *instance_p) if (unlikely(kinesis_get_result( connector_specific_data->request_outcomes, error_message, &sent_bytes, &lost_bytes))) { // oops! we couldn't send (all or some of the) data - error("EXPORTING: %s", error_message); - error( - "EXPORTING: failed to write data to external database '%s'. Willing to write %zu bytes, wrote %zu bytes.", - instance->config.destination, sent_bytes, sent_bytes - lost_bytes); + netdata_log_error("EXPORTING: %s", error_message); + netdata_log_error("EXPORTING: failed to write data to external database '%s'. Willing to write %zu bytes, wrote %zu bytes.", + instance->config.destination, + sent_bytes, + sent_bytes - lost_bytes); stats->transmission_failures++; stats->data_lost_events++; diff --git a/exporting/exporting_engine.c b/exporting/exporting_engine.c index 50bad99429..f42a36e921 100644 --- a/exporting/exporting_engine.c +++ b/exporting/exporting_engine.c @@ -183,7 +183,7 @@ void *exporting_main(void *ptr) } if (init_connectors(engine) != 0) { - error("EXPORTING: cannot initialize exporting connectors"); + netdata_log_error("EXPORTING: cannot initialize exporting connectors"); send_statistics("EXPORTING_START", "FAIL", "-"); goto cleanup; } diff --git a/exporting/exporting_engine.h b/exporting/exporting_engine.h index c04bbeec36..fb436e9338 100644 --- a/exporting/exporting_engine.h +++ b/exporting/exporting_engine.h @@ -307,7 +307,7 @@ static inline void disable_instance(struct instance *instance) instance->disabled = 1; instance->scheduled = 0; uv_mutex_unlock(&instance->mutex); - error("EXPORTING: Instance %s disabled", instance->config.name); + netdata_log_error("EXPORTING: Instance %s disabled", instance->config.name); } #include "exporting/prometheus/prometheus.h" diff --git a/exporting/graphite/graphite.c b/exporting/graphite/graphite.c index 34b2509c9e..254db982e5 100644 --- a/exporting/graphite/graphite.c +++ b/exporting/graphite/graphite.c @@ -49,7 +49,7 @@ int init_graphite_instance(struct instance *instance) instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { - error("EXPORTING: cannot create buffer for graphite exporting connector instance %s", instance->config.name); + netdata_log_error("EXPORTING: cannot create buffer for graphite exporting connector instance %s", instance->config.name); return 1; } diff --git a/exporting/init_connectors.c b/exporting/init_connectors.c index 15e1951f8f..5167a68c2d 100644 --- a/exporting/init_connectors.c +++ b/exporting/init_connectors.c @@ -85,14 +85,14 @@ int init_connectors(struct engine *engine) #endif break; default: - error("EXPORTING: unknown exporting connector type"); + netdata_log_error("EXPORTING: unknown exporting connector type"); return 1; } // dispatch the instance worker thread int error = uv_thread_create(&instance->thread, instance->worker, instance); if (error) { - error("EXPORTING: cannot create thread worker. uv_thread_create(): %s", uv_strerror(error)); + netdata_log_error("EXPORTING: cannot create thread worker. uv_thread_create(): %s", uv_strerror(error)); return 1; } char threadname[NETDATA_THREAD_NAME_MAX + 1]; @@ -113,7 +113,7 @@ static size_t base64_encode(unsigned char *input, size_t input_size, char *outpu "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; if ((input_size / 3 + 1) * 4 >= output_size) { - error("Output buffer for encoding size=%zu is not large enough for %zu-bytes input", output_size, input_size); + netdata_log_error("Output buffer for encoding size=%zu is not large enough for %zu-bytes input", output_size, input_size); return 0; } size_t count = 0; @@ -123,7 +123,7 @@ static size_t base64_encode(unsigned char *input, size_t input_size, char *outpu output[1] = lookup[(value >> 12) & 0x3f]; output[2] = lookup[(value >> 6) & 0x3f]; output[3] = lookup[value & 0x3f]; - //error("Base-64 encode (%04x) -> %c %c %c %c\n", value, output[0], output[1], output[2], output[3]); + //netdata_log_error("Base-64 encode (%04x) -> %c %c %c %c\n", value, output[0], output[1], output[2], output[3]); output += 4; input += 3; input_size -= 3; @@ -136,7 +136,7 @@ static size_t base64_encode(unsigned char *input, size_t input_size, char *outpu output[1] = lookup[(value >> 6) & 0x3f]; output[2] = lookup[value & 0x3f]; output[3] = '='; - //error("Base-64 encode (%06x) -> %c %c %c %c\n", (value>>2)&0xffff, output[0], output[1], output[2], output[3]); + //netdata_log_error("Base-64 encode (%06x) -> %c %c %c %c\n", (value>>2)&0xffff, output[0], output[1], output[2], output[3]); count += 4; output[4] = '\0'; break; @@ -146,7 +146,7 @@ static size_t base64_encode(unsigned char *input, size_t input_size, char *outpu output[1] = lookup[value & 0x3f]; output[2] = '='; output[3] = '='; - //error("Base-64 encode (%06x) -> %c %c %c %c\n", value, output[0], output[1], output[2], output[3]); + //netdata_log_error("Base-64 encode (%06x) -> %c %c %c %c\n", value, output[0], output[1], output[2], output[3]); count += 4; output[4] = '\0'; break; diff --git a/exporting/json/json.c b/exporting/json/json.c index 4155a7c401..d916fe7741 100644 --- a/exporting/json/json.c +++ b/exporting/json/json.c @@ -39,7 +39,7 @@ int init_json_instance(struct instance *instance) instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { - error("EXPORTING: cannot create buffer for json exporting connector instance %s", instance->config.name); + netdata_log_error("EXPORTING: cannot create buffer for json exporting connector instance %s", instance->config.name); return 1; } diff --git a/exporting/mongodb/mongodb.c b/exporting/mongodb/mongodb.c index 9a5ae3fc2e..bd7541a9d0 100644 --- a/exporting/mongodb/mongodb.c +++ b/exporting/mongodb/mongodb.c @@ -18,21 +18,22 @@ int mongodb_init(struct instance *instance) bson_error_t bson_error; if (unlikely(!connector_specific_config->collection || !*connector_specific_config->collection)) { - error("EXPORTING: collection name is a mandatory MongoDB parameter, but it is not configured"); + netdata_log_error("EXPORTING: collection name is a mandatory MongoDB parameter, but it is not configured"); return 1; } uri = mongoc_uri_new_with_error(instance->config.destination, &bson_error); if (unlikely(!uri)) { - error( - "EXPORTING: failed to parse URI: %s. Error message: %s", instance->config.destination, bson_error.message); + netdata_log_error("EXPORTING: failed to parse URI: %s. Error message: %s", + instance->config.destination, + bson_error.message); return 1; } int32_t socket_timeout = mongoc_uri_get_option_as_int32(uri, MONGOC_URI_SOCKETTIMEOUTMS, instance->config.timeoutms); if (!mongoc_uri_set_option_as_int32(uri, MONGOC_URI_SOCKETTIMEOUTMS, socket_timeout)) { - error("EXPORTING: failed to set %s to the value %d", MONGOC_URI_SOCKETTIMEOUTMS, socket_timeout); + netdata_log_error("EXPORTING: failed to set %s to the value %d", MONGOC_URI_SOCKETTIMEOUTMS, socket_timeout); return 1; }; @@ -41,12 +42,12 @@ int mongodb_init(struct instance *instance) connector_specific_data->client = mongoc_client_new_from_uri(uri); if (unlikely(!connector_specific_data->client)) { - error("EXPORTING: failed to create a new client"); + netdata_log_error("EXPORTING: failed to create a new client"); return 1; } if (!mongoc_client_set_appname(connector_specific_data->client, "netdata")) { - error("EXPORTING: failed to set client appname"); + netdata_log_error("EXPORTING: failed to set client appname"); }; connector_specific_data->collection = mongoc_client_get_collection( @@ -108,7 +109,8 @@ int init_mongodb_instance(struct instance *instance) instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { - error("EXPORTING: cannot create buffer for MongoDB exporting connector instance %s", instance->config.name); + netdata_log_error("EXPORTING: cannot create buffer for MongoDB exporting connector instance %s", + instance->config.name); return 1; } if (uv_mutex_init(&instance->mutex)) @@ -128,7 +130,7 @@ int init_mongodb_instance(struct instance *instance) } if (unlikely(mongodb_init(instance))) { - error("EXPORTING: cannot initialize MongoDB exporting connector"); + netdata_log_error("EXPORTING: cannot initialize MongoDB exporting connector"); return 1; } @@ -195,7 +197,7 @@ int format_batch_mongodb(struct instance *instance) insert[documents_inserted] = bson_new_from_json((const uint8_t *)start, -1, &bson_error); if (unlikely(!insert[documents_inserted])) { - error( + netdata_log_error( "EXPORTING: Failed creating a BSON document from a JSON string \"%s\" : %s", start, bson_error.message); free_bson(insert, documents_inserted); return 1; @@ -350,8 +352,8 @@ void mongodb_connector_worker(void *instance_p) stats->receptions++; } else { // oops! we couldn't send (all or some of the) data - error("EXPORTING: %s", bson_error.message); - error( + netdata_log_error("EXPORTING: %s", bson_error.message); + netdata_log_error( "EXPORTING: failed to write data to the database '%s'. " "Willing to write %zu bytes, wrote %zu bytes.", instance->config.destination, data_size, 0UL); diff --git a/exporting/opentsdb/opentsdb.c b/exporting/opentsdb/opentsdb.c index 3362a335af..ffccb5b223 100644 --- a/exporting/opentsdb/opentsdb.c +++ b/exporting/opentsdb/opentsdb.c @@ -46,7 +46,7 @@ int init_opentsdb_telnet_instance(struct instance *instance) instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { - error("EXPORTING: cannot create buffer for opentsdb telnet exporting connector instance %s", instance->config.name); + netdata_log_error("EXPORTING: cannot create buffer for opentsdb telnet exporting connector instance %s", instance->config.name); return 1; } @@ -102,7 +102,7 @@ int init_opentsdb_http_instance(struct instance *instance) instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { - error("EXPORTING: cannot create buffer for opentsdb HTTP exporting connector instance %s", instance->config.name); + netdata_log_error("EXPORTING: cannot create buffer for opentsdb HTTP exporting connector instance %s", instance->config.name); return 1; } diff --git a/exporting/process_data.c b/exporting/process_data.c index 88d0b56a11..e36c5fa993 100644 --- a/exporting/process_data.c +++ b/exporting/process_data.c @@ -170,7 +170,7 @@ void start_batch_formatting(struct engine *engine) if (instance->scheduled) { uv_mutex_lock(&instance->mutex); if (instance->start_batch_formatting && instance->start_batch_formatting(instance) != 0) { - error("EXPORTING: cannot start batch formatting for %s", instance->config.name); + netdata_log_error("EXPORTING: cannot start batch formatting for %s", instance->config.name); disable_instance(instance); } } @@ -189,7 +189,7 @@ void start_host_formatting(struct engine *engine, RRDHOST *host) if (instance->scheduled) { if (rrdhost_is_exportable(instance, host)) { if (instance->start_host_formatting && instance->start_host_formatting(instance, host) != 0) { - error("EXPORTING: cannot start host formatting for %s", instance->config.name); + netdata_log_error("EXPORTING: cannot start host formatting for %s", instance->config.name); disable_instance(instance); } } else { @@ -211,7 +211,7 @@ void start_chart_formatting(struct engine *engine, RRDSET *st) if (instance->scheduled && !instance->skip_host) { if (rrdset_is_exportable(instance, st)) { if (instance->start_chart_formatting && instance->start_chart_formatting(instance, st) != 0) { - error("EXPORTING: cannot start chart formatting for %s", instance->config.name); + netdata_log_error("EXPORTING: cannot start chart formatting for %s", instance->config.name); disable_instance(instance); } } else { @@ -232,7 +232,7 @@ void metric_formatting(struct engine *engine, RRDDIM *rd) for (struct instance *instance = engine->instance_root; instance; instance = instance->next) { if (instance->scheduled && !instance->skip_host && !instance->skip_chart) { if (instance->metric_formatting && instance->metric_formatting(instance, rd) != 0) { - error("EXPORTING: cannot format metric for %s", instance->config.name); + netdata_log_error("EXPORTING: cannot format metric for %s", instance->config.name); disable_instance(instance); continue; } @@ -252,7 +252,7 @@ void end_chart_formatting(struct engine *engine, RRDSET *st) for (struct instance *instance = engine->instance_root; instance; instance = instance->next) { if (instance->scheduled && !instance->skip_host && !instance->skip_chart) { if (instance->end_chart_formatting && instance->end_chart_formatting(instance, st) != 0) { - error("EXPORTING: cannot end chart formatting for %s", instance->config.name); + netdata_log_error("EXPORTING: cannot end chart formatting for %s", instance->config.name); disable_instance(instance); continue; } @@ -271,8 +271,8 @@ void variables_formatting(struct engine *engine, RRDHOST *host) { for (struct instance *instance = engine->instance_root; instance; instance = instance->next) { if (instance->scheduled && !instance->skip_host && should_send_variables(instance)) { - if (instance->variables_formatting && instance->variables_formatting(instance, host) != 0){ - error("EXPORTING: cannot format variables for %s", instance->config.name); + if (instance->variables_formatting && instance->variables_formatting(instance, host) != 0){ + netdata_log_error("EXPORTING: cannot format variables for %s", instance->config.name); disable_instance(instance); continue; } @@ -293,7 +293,7 @@ void end_host_formatting(struct engine *engine, RRDHOST *host) for (struct instance *instance = engine->instance_root; instance; instance = instance->next) { if (instance->scheduled && !instance->skip_host) { if (instance->end_host_formatting && instance->end_host_formatting(instance, host) != 0) { - error("EXPORTING: cannot end host formatting for %s", instance->config.name); + netdata_log_error("EXPORTING: cannot end host formatting for %s", instance->config.name); disable_instance(instance); continue; } @@ -312,7 +312,7 @@ void end_batch_formatting(struct engine *engine) for (struct instance *instance = engine->instance_root; instance; instance = instance->next) { if (instance->scheduled) { if (instance->end_batch_formatting && instance->end_batch_formatting(instance) != 0) { - error("EXPORTING: cannot end batch formatting for %s", instance->config.name); + netdata_log_error("EXPORTING: cannot end batch formatting for %s", instance->config.name); disable_instance(instance); continue; } diff --git a/exporting/prometheus/remote_write/remote_write.c b/exporting/prometheus/remote_write/remote_write.c index 39b977312e..b48095d16d 100644 --- a/exporting/prometheus/remote_write/remote_write.c +++ b/exporting/prometheus/remote_write/remote_write.c @@ -386,7 +386,7 @@ int format_batch_prometheus_remote_write(struct instance *instance) size_t data_size = get_write_request_size(connector_specific_data->write_request); if (unlikely(!data_size)) { - error("EXPORTING: write request size is out of range"); + netdata_log_error("EXPORTING: write request size is out of range"); return 1; } @@ -394,7 +394,7 @@ int format_batch_prometheus_remote_write(struct instance *instance) buffer_need_bytes(buffer, data_size); if (unlikely(pack_and_clear_write_request(connector_specific_data->write_request, buffer->buffer, &data_size))) { - error("EXPORTING: cannot pack write request"); + netdata_log_error("EXPORTING: cannot pack write request"); return 1; } buffer->len = data_size; diff --git a/exporting/pubsub/pubsub.c b/exporting/pubsub/pubsub.c index b889801021..5e67b5e065 100644 --- a/exporting/pubsub/pubsub.c +++ b/exporting/pubsub/pubsub.c @@ -32,7 +32,7 @@ int init_pubsub_instance(struct instance *instance) instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { - error("EXPORTING: cannot create buffer for Pub/Sub exporting connector instance %s", instance->config.name); + netdata_log_error("EXPORTING: cannot create buffer for Pub/Sub exporting connector instance %s", instance->config.name); return 1; } uv_mutex_init(&instance->mutex); @@ -48,7 +48,7 @@ int init_pubsub_instance(struct instance *instance) (void *)connector_specific_data, error_message, instance->config.destination, connector_specific_config->credentials_file, connector_specific_config->project_id, connector_specific_config->topic_id)) { - error( + netdata_log_error( "EXPORTING: Cannot initialize a Pub/Sub publisher for instance %s: %s", instance->config.name, error_message); return 1; @@ -132,7 +132,7 @@ void pubsub_connector_worker(void *instance_p) stats->buffered_bytes = buffer_len; if (pubsub_add_message(instance->connector_specific_data, (char *)buffer_tostring(buffer))) { - error("EXPORTING: Instance %s: Cannot add data to a message", instance->config.name); + netdata_log_error("EXPORTING: Instance %s: Cannot add data to a message", instance->config.name); stats->data_lost_events++; stats->lost_metrics += stats->buffered_metrics; @@ -146,7 +146,7 @@ void pubsub_connector_worker(void *instance_p) connector_specific_config->project_id, connector_specific_config->topic_id, buffer_len); if (pubsub_publish((void *)connector_specific_data, error_message, stats->buffered_metrics, buffer_len)) { - error("EXPORTING: Instance: %s: Cannot publish a message: %s", instance->config.name, error_message); + netdata_log_error("EXPORTING: Instance: %s: Cannot publish a message: %s", instance->config.name, error_message); stats->transmission_failures++; stats->data_lost_events++; @@ -164,8 +164,8 @@ void pubsub_connector_worker(void *instance_p) if (unlikely(pubsub_get_result( connector_specific_data, error_message, &sent_metrics, &sent_bytes, &lost_metrics, &lost_bytes))) { // oops! we couldn't send (all or some of the) data - error("EXPORTING: %s", error_message); - error( + netdata_log_error("EXPORTING: %s", error_message); + netdata_log_error( "EXPORTING: failed to write data to service '%s'. Willing to write %zu bytes, wrote %zu bytes.", instance->config.destination, lost_bytes, sent_bytes); diff --git a/exporting/read_config.c b/exporting/read_config.c index c1cdfd26db..210ba3c667 100644 --- a/exporting/read_config.c +++ b/exporting/read_config.c @@ -176,7 +176,7 @@ inline EXPORTING_OPTIONS exporting_parse_data_source(const char *data_source, EX exporting_options |= EXPORTING_SOURCE_DATA_SUM; exporting_options &= ~(EXPORTING_OPTIONS_SOURCE_BITS ^ EXPORTING_SOURCE_DATA_SUM); } else { - error("EXPORTING: invalid data data_source method '%s'.", data_source); + netdata_log_error("EXPORTING: invalid data data_source method '%s'.", data_source); } return exporting_options; @@ -316,34 +316,34 @@ struct engine *read_exporting_config() netdata_log_info("Instance %s on %s", tmp_ci_list->local_ci.instance_name, tmp_ci_list->local_ci.connector_name); if (tmp_ci_list->exporting_type == EXPORTING_CONNECTOR_TYPE_UNKNOWN) { - error("Unknown exporting connector type"); + netdata_log_error("Unknown exporting connector type"); goto next_connector_instance; } #ifndef ENABLE_PROMETHEUS_REMOTE_WRITE if (tmp_ci_list->exporting_type == EXPORTING_CONNECTOR_TYPE_PROMETHEUS_REMOTE_WRITE) { - error("Prometheus Remote Write support isn't compiled"); + netdata_log_error("Prometheus Remote Write support isn't compiled"); goto next_connector_instance; } #endif #ifndef HAVE_KINESIS if (tmp_ci_list->exporting_type == EXPORTING_CONNECTOR_TYPE_KINESIS) { - error("AWS Kinesis support isn't compiled"); + netdata_log_error("AWS Kinesis support isn't compiled"); goto next_connector_instance; } #endif #ifndef ENABLE_EXPORTING_PUBSUB if (tmp_ci_list->exporting_type == EXPORTING_CONNECTOR_TYPE_PUBSUB) { - error("Google Cloud Pub/Sub support isn't compiled"); + netdata_log_error("Google Cloud Pub/Sub support isn't compiled"); goto next_connector_instance; } #endif #ifndef HAVE_MONGOC if (tmp_ci_list->exporting_type == EXPORTING_CONNECTOR_TYPE_MONGODB) { - error("MongoDB support isn't compiled"); + netdata_log_error("MongoDB support isn't compiled"); goto next_connector_instance; } #endif diff --git a/exporting/send_data.c b/exporting/send_data.c index a58a850b12..5afcb754cb 100644 --- a/exporting/send_data.c +++ b/exporting/send_data.c @@ -96,14 +96,14 @@ void simple_connector_receive_response(int *sock, struct instance *instance) stats->receptions++; } else if (r == 0) { - error("EXPORTING: '%s' closed the socket", instance->config.destination); + netdata_log_error("EXPORTING: '%s' closed the socket", instance->config.destination); close(*sock); *sock = -1; } else { // failed to receive data if (errno != EAGAIN && errno != EWOULDBLOCK) { - error("EXPORTING: cannot receive data from '%s'.", instance->config.destination); + netdata_log_error("EXPORTING: cannot receive data from '%s'.", instance->config.destination); } } @@ -182,7 +182,7 @@ void simple_connector_send_buffer( buffer_flush(buffer); } else { // oops! we couldn't send (all or some of the) data - error( + netdata_log_error( "EXPORTING: failed to write data to '%s'. Willing to write %zu bytes, wrote %zd bytes. Will re-connect.", instance->config.destination, buffer_len, @@ -299,7 +299,7 @@ void simple_connector_worker(void *instance_p) if (exporting_tls_is_enabled(instance->config.type, options) && sock != -1) { if (netdata_ssl_exporting_ctx) { if (sock_delnonblock(sock) < 0) - error("Exporting cannot remove the non-blocking flag from socket %d", sock); + netdata_log_error("Exporting cannot remove the non-blocking flag from socket %d", sock); if(netdata_ssl_open(&connector_specific_data->ssl, netdata_ssl_exporting_ctx, sock)) { if(netdata_ssl_connect(&connector_specific_data->ssl)) { @@ -313,7 +313,7 @@ void simple_connector_worker(void *instance_p) tv.tv_sec = 2; if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (const char *)&tv, sizeof(tv))) - error("Cannot set timeout to socket %d, this can block communication", sock); + netdata_log_error("Cannot set timeout to socket %d, this can block communication", sock); } } } @@ -340,7 +340,7 @@ void simple_connector_worker(void *instance_p) connector_specific_data->buffer, buffered_metrics); } else { - error("EXPORTING: failed to update '%s'", instance->config.destination); + netdata_log_error("EXPORTING: failed to update '%s'", instance->config.destination); stats->transmission_failures++; // increment the counter we check for data loss |