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/pubsub | |
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/pubsub')
-rw-r--r-- | exporting/pubsub/pubsub.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/exporting/pubsub/pubsub.c b/exporting/pubsub/pubsub.c index d65fc2c40..4989160a4 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; @@ -64,7 +64,7 @@ int init_pubsub_instance(struct instance *instance) */ void clean_pubsub_instance(struct instance *instance) { - info("EXPORTING: cleaning up instance %s ...", instance->config.name); + netdata_log_info("EXPORTING: cleaning up instance %s ...", instance->config.name); struct pubsub_specific_data *connector_specific_data = (struct pubsub_specific_data *)instance->connector_specific_data; @@ -80,7 +80,7 @@ void clean_pubsub_instance(struct instance *instance) freez(connector_specific_config->topic_id); 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; return; @@ -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; @@ -141,12 +141,12 @@ void pubsub_connector_worker(void *instance_p) goto cleanup; } - debug( + netdata_log_debug( D_EXPORTING, "EXPORTING: pubsub_publish(): project = %s, topic = %s, buffer = %zu", 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); |