diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
commit | ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb (patch) | |
tree | 7a900833aad3ccc685712c6c2a7d87576d54f427 /exporting/aws_kinesis | |
parent | Adding upstream version 1.40.1. (diff) | |
download | netdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.tar.xz netdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.zip |
Adding upstream version 1.41.0.upstream/1.41.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'exporting/aws_kinesis')
-rw-r--r-- | exporting/aws_kinesis/aws_kinesis.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/exporting/aws_kinesis/aws_kinesis.c b/exporting/aws_kinesis/aws_kinesis.c index c7d7a9d3..d52c676a 100644 --- a/exporting/aws_kinesis/aws_kinesis.c +++ b/exporting/aws_kinesis/aws_kinesis.c @@ -7,7 +7,7 @@ */ void aws_kinesis_cleanup(struct instance *instance) { - info("EXPORTING: cleaning up instance %s ...", instance->config.name); + netdata_log_info("EXPORTING: cleaning up instance %s ...", instance->config.name); kinesis_shutdown(instance->connector_specific_data); freez(instance->connector_specific_data); @@ -21,7 +21,7 @@ void aws_kinesis_cleanup(struct instance *instance) freez(connector_specific_config); } - info("EXPORTING: instance %s exited", instance->config.name); + netdata_log_info("EXPORTING: instance %s exited", instance->config.name); instance->exited = 1; } @@ -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; } @@ -151,17 +152,16 @@ void aws_kinesis_connector_worker(void *instance_p) } char error_message[ERROR_LINE_MAX + 1] = ""; - debug( - D_EXPORTING, - "EXPORTING: kinesis_put_record(): dest = %s, id = %s, key = %s, stream = %s, partition_key = %s, \ - buffer = %zu, record = %zu", - instance->config.destination, - connector_specific_config->auth_key_id, - connector_specific_config->secure_key, - connector_specific_config->stream_name, - partition_key, - buffer_len, - record_len); + netdata_log_debug(D_EXPORTING, + "EXPORTING: kinesis_put_record(): dest = %s, id = %s, key = %s, stream = %s, partition_key = %s, \ " + " buffer = %zu, record = %zu", + instance->config.destination, + connector_specific_config->auth_key_id, + connector_specific_config->secure_key, + connector_specific_config->stream_name, + partition_key, + buffer_len, + record_len); kinesis_put_record( connector_specific_data, connector_specific_config->stream_name, partition_key, first_char, record_len); @@ -174,10 +174,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++; |