Commit 4f20312a authored by Geoff Simmons's avatar Geoff Simmons

varnishevent: added length high watermark

parent 84791d61
......@@ -110,7 +110,7 @@ VTAILQ_HEAD(insert_head_s, fd_t);
static struct insert_head_s insert_head = VTAILQ_HEAD_INITIALIZER(insert_head);
static unsigned seen = 0, open = 0, submitted = 0, not_logged = 0, occ_hi = 0,
waits = 0, len_overflows = 0, hdr_overflows = 0, expired = 0;
len_hi = 0, waits = 0, len_overflows = 0, hdr_overflows = 0, expired = 0;
/* Hack, because we cannot have #ifdef in the macro definition SIGDISP */
#define _UNDEFINED(SIG) ((#SIG)[0] == 0)
......@@ -161,10 +161,10 @@ RDR_Stats(void)
{
LOG_Log(LOG_INFO, "Reader (%s): fd_max=%u seen=%u open=%u load=%.2f "
"submitted=%u not_logged=%u occ_hi=%u waits=%u expired=%u free=%u "
"len_overflows=%u hdr_overflows=%u",
"len_hi=%u len_overflows=%u hdr_overflows=%u",
waiting ? "waiting" : "running", config.max_fd, seen, open,
100.0 * open / config.max_fd, submitted, not_logged, occ_hi, waits,
expired, rdr_free, len_overflows, hdr_overflows);
expired, rdr_free, len_hi, len_overflows, hdr_overflows);
}
static inline logline_t
......@@ -317,7 +317,10 @@ collect(struct logline_t *lp, enum VSL_tag_e tag, unsigned spec,
if (tag == SLT_VCL_Log && memchr(ptr, ':', len) == NULL)
return;
if (len > len_hi)
len_hi = len;
if (len > config.max_reclen) {
LOG_Log(LOG_ALERT,
"Data length %u exceeds max %u, DATA TRUNCATED: %s [%.*s]",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment