consistent logging
Costa Tsaousis committed
Feb 23, 2017 at 17:56 UTC
3ef530336d65fcb0aab9a7e73954944b95e6c9b3
1 file changed
+4
-4
src/rrdpush.c
+4
-4
@@ -471,9 +471,9 @@ int rrdpush_receive(int fd, const char *key, const char *hostname, const char *m
471
rrdhost_unlock(host);
472
473
// call the plugins.d processor to receive the metrics
474
- info("STREAM [%s]:%s: connecting client to plugins.d on host '%s' with machine GUID '%s'.", client_ip, client_port, host->hostname, host->machine_guid);
474
+ info("STREAM [%s]:%s: connecting client to plugins.d (host '%s', machine GUID '%s').", client_ip, client_port, host->hostname, host->machine_guid);
475
size_t count = pluginsd_process(host, &cd, fp, 1);
476
- error("STREAM [%s]:%s: client disconnected (host '%s', machine GUID '%s').", client_ip, client_port, host->hostname, host->machine_guid);
476
+ error("STREAM [%s]:%s: client disconnected (host '%s', machine GUID '%s', completed updates %zu).", client_ip, client_port, host->hostname, host->machine_guid, count);
477
478
rrdhost_wrlock(host);
479
host->use_counter--;
@@ -501,8 +501,6 @@ struct rrdpush_thread {
501
void *rrdpush_receiver_thread(void *ptr) {
502
struct rrdpush_thread *rpt = (struct rrdpush_thread *)ptr;
503
504
- info("STREAM: central netdata receive thread created with task id %d, for client [%s]:%s", gettid(), rpt->client_ip, rpt->client_port);
505
-
504
if (pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) != 0)
505
error("STREAM: cannot set pthread cancel type to DEFERRED.");
506
@@ -510,7 +508,9 @@ void *rrdpush_receiver_thread(void *ptr) {
508
error("STREAM: cannot set pthread cancel state to ENABLE.");
509
510
511
+ info("STREAM [%s]:%s: receive thread created (task id %d)", rpt->client_ip, rpt->client_port, gettid());
512
rrdpush_receive(rpt->fd, rpt->key, rpt->hostname, rpt->machine_guid, rpt->os, rpt->update_every, rpt->client_ip, rpt->client_port);
513
+ info("STREAM [%s]:%s: receive thread ended (task id %d)", rpt->client_ip, rpt->client_port, gettid());
514
515
close(rpt->fd);
516
freez(rpt->key);