mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 23:01:03 +01:00
[MINOR] halog: skip non-traffic logs for -st and -tc
Those were reporting stupid results in presence of administrative logs.
This commit is contained in:
parent
d8fc1103a5
commit
5417081c79
@ -603,7 +603,16 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(filter & FILT_COUNT_STATUS)) {
|
if (unlikely(filter & FILT_COUNT_STATUS)) {
|
||||||
b = field_start(line, STATUS_FIELD + skip_fields);
|
/* first, let's ensure that the line is a traffic line (beginning
|
||||||
|
* with an IP address)
|
||||||
|
*/
|
||||||
|
b = field_start(line, SOURCE_FIELD + skip_fields);
|
||||||
|
if (*b < '0' || *b > '9') {
|
||||||
|
parse_err++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
b = field_start(b, STATUS_FIELD - SOURCE_FIELD + 1);
|
||||||
if (!*b) {
|
if (!*b) {
|
||||||
truncated_line(linenum, line);
|
truncated_line(linenum, line);
|
||||||
continue;
|
continue;
|
||||||
@ -616,7 +625,16 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(filter & FILT_COUNT_TERM_CODES)) {
|
if (unlikely(filter & FILT_COUNT_TERM_CODES)) {
|
||||||
b = field_start(line, TERM_CODES_FIELD + skip_fields);
|
/* first, let's ensure that the line is a traffic line (beginning
|
||||||
|
* with an IP address)
|
||||||
|
*/
|
||||||
|
b = field_start(line, SOURCE_FIELD + skip_fields);
|
||||||
|
if (*b < '0' || *b > '9') {
|
||||||
|
parse_err++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
b = field_start(b, TERM_CODES_FIELD - SOURCE_FIELD + 1);
|
||||||
if (!*b) {
|
if (!*b) {
|
||||||
truncated_line(linenum, line);
|
truncated_line(linenum, line);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user