@cryptotaxi247 / netdata-1 / commits / 17050415b

prevent repeating the last url on the syslog

Costa Tsaousis (ktsaou) committed Apr 18, 2014 at 22:48 UTC 17050415b14e5d4ea86d14293b4b11e74965f2af
1 file changed +4 -1
netdata.c
+4 -1
@@ -1386,7 +1386,8 @@ void web_client_reset(struct web_client *w)
1386
1387 long sent = w->zoutput?w->zstream.total_out:(w->mode == WEB_CLIENT_MODE_FILECOPY)?w->data->rbytes:w->data->bytes;
1388 long size = (w->mode == WEB_CLIENT_MODE_FILECOPY)?w->data->rbytes:w->data->bytes;
1389 - syslog(LOG_NOTICE, "%llu: (sent/all = %ld/%ld bytes %0.0f%%, prep/sent/total = %0.2f/%0.2f/%0.2f ms) %s: '%s'",
1389 +
1390 + if(w->last_url[0]) syslog(LOG_NOTICE, "%llu: (sent/all = %ld/%ld bytes %0.0f%%, prep/sent/total = %0.2f/%0.2f/%0.2f ms) %s: '%s'",
1391 w->id,
1392 sent, size, -((size>0)?((float)(size-sent)/(float)size * 100.0):0.0),
1393 (float)usecdiff(&w->tv_ready, &w->tv_in) / 1000.0,
@@ -1404,6 +1405,8 @@ void web_client_reset(struct web_client *w)
1405 w->ifd = w->ofd;
1406 }
1407
1408 + w->last_url[0] = '\0';
1409 +
1410 w->data->contenttype = CT_TEXT_PLAIN;
1411 w->mode = WEB_CLIENT_MODE_NORMAL;
1412