X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=htmlandlogs.c;h=c0d564894684a645e37372c6b44ab3c93e850797;hp=e11af1abac500b99e2b38d3489a4769a57e1455e;hb=0995c4adca9bd65afd16064d582ae8c404c2e8d5;hpb=e36b49c7652e11488c5945113f8c62146a279578 diff --git a/htmlandlogs.c b/htmlandlogs.c index e11af1a..c0d5648 100644 --- a/htmlandlogs.c +++ b/htmlandlogs.c @@ -30,14 +30,18 @@ void append_log(struct IP *self) /*using global variables*/ FILE *f; date(d); /* this is typical cll1.h macro - prints current date */ - string(str,STRLEN); - sprintf(str,"%s/%s.log", log_dir, self->name); - f=fopen(str,"a"); + string(str, STRLEN); + sprintf(str, "%s/%s.log", log_dir, self->name); + + /*-----------------------------------------------------------------*/ + printf("Writing traffic log %s ...\n", str); + /*-----------------------------------------------------------------*/ + f = fopen(str, "a"); if(f > 0) { - fprintf(f,"%ld\t%s\t%Lu\t%Lu\t%Lu\t%Lu\t%d\t%d\t%d\t%d\t%s", - time(NULL), self->name, self->traffic, self->direct, self->proxy, - self->upload, self->min, self->max, self->desired, self->lmsid, d); /* d = date*/ + fprintf(f, "%ld\t%s\t%Lu\t%Lu\t%Lu\t%Lu\t%d\t%d\t%d\t%d\t%s", + time(NULL), self->name, self->traffic, self->direct, self->proxy, + self->upload, self->min, self->max, self->desired, self->lmsid, d); /* d = date*/ fclose(f); } else