diff --git a/contrib/halog/halog.c b/contrib/halog/halog.c index b9da76155..ebdcfcfc4 100644 --- a/contrib/halog/halog.c +++ b/contrib/halog/halog.c @@ -1,5 +1,5 @@ /* - * haproxy log time reporter + * haproxy log statistics reporter * * Copyright 2000-2010 Willy Tarreau * @@ -10,14 +10,6 @@ * */ -/* - * gcc -O2 -o halog2 halog2.c -Iinclude src/ebtree.c src/eb32tree.c fgets2.c - * - * Usage: - * $0 [ min_delay [ min_count [ field_shift ]]] < haproxy.log - * Note: if min_delay < 0, it only outputs lines with status codes 5xx. - */ - #include #include #include @@ -35,6 +27,7 @@ #define SERVER_FIELD 8 #define TIME_FIELD 9 #define STATUS_FIELD 10 +#define TERM_CODES_FIELD 14 #define CONN_FIELD 15 #define MAXLINE 16384 #define QBITS 4 @@ -75,6 +68,7 @@ struct srv_st { #define FILT_COUNT_STATUS 0x800 #define FILT_COUNT_SRV_STATUS 0x1000 +#define FILT_COUNT_TERM_CODES 0x2000 unsigned int filter = 0; unsigned int filter_invert = 0; @@ -86,7 +80,7 @@ void die(const char *msg) { fprintf(stderr, "%s" - "Usage: halog [-q] [-c] [-v] [-gt] [-pct] [-st] [-srv] [-s ] [-e|-E] [-rt|-RT