From: Willy Tarreau Date: Fri, 5 Mar 2010 16:42:58 +0000 (+0100) Subject: [MINOR] stats: don't send empty lines in "show errors" X-Git-Tag: v1.4.2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8811f8e82efed5492b1e2ccca05728b94f3cd243;p=thirdparty%2Fhaproxy.git [MINOR] stats: don't send empty lines in "show errors" Empty lines indicate end of dump, so it's important not to do that. Send a single space instead. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index b2967fc410..91b92e521f 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -2597,7 +2597,7 @@ int stats_dump_errors_to_buffer(struct session *s, struct buffer *rep) struct tm tm; get_localtime(es->when.tv_sec, &tm); - chunk_printf(&msg, "\n[%02d/%s/%04d:%02d:%02d:%02d.%03d]", + chunk_printf(&msg, " \n[%02d/%s/%04d:%02d:%02d:%02d.%03d]", tm.tm_mday, monthname[tm.tm_mon], tm.tm_year+1900, tm.tm_hour, tm.tm_min, tm.tm_sec, (int)(es->when.tv_usec/1000)); @@ -2616,7 +2616,7 @@ int stats_dump_errors_to_buffer(struct session *s, struct buffer *rep) chunk_printf(&msg, " frontend %s (#%d): invalid request\n" " src %s, session #%d, backend %s (#%d), server %s (#%d)\n" - " request length %d bytes, error at position %d:\n\n", + " request length %d bytes, error at position %d:\n \n", s->data_ctx.errors.px->id, s->data_ctx.errors.px->uuid, pn, es->sid, es->oe->id, es->oe->uuid, es->srv ? es->srv->id : "", @@ -2627,7 +2627,7 @@ int stats_dump_errors_to_buffer(struct session *s, struct buffer *rep) chunk_printf(&msg, " backend %s (#%d) : invalid response\n" " src %s, session #%d, frontend %s (#%d), server %s (#%d)\n" - " response length %d bytes, error at position %d:\n\n", + " response length %d bytes, error at position %d:\n \n", s->data_ctx.errors.px->id, s->data_ctx.errors.px->uuid, pn, es->sid, es->oe->id, es->oe->uuid, es->srv ? es->srv->id : "",