Commit 6c0c0181 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Dridi Boukelmoune

Add a -m ("Miss") argument which also logs the records which do not match

parent 98f594e6
......@@ -65,6 +65,8 @@
* \-q query
* Filter records using a query expression, see ``man vsl-query`` for
* more information.
* \-m
* Also emit log records for misses (only for debugging)
*
* \-start
* Start the logexpect thread in the background.
......@@ -153,6 +155,7 @@ struct logexp {
int vxid_last;
int tag_last;
int m_arg;
int d_arg;
enum VSL_grouping_e g_arg;
char *query;
......@@ -308,6 +311,8 @@ logexp_dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[],
if (ok)
legend = "match";
else if (skip && le->m_arg)
legend = "miss";
else if (skip)
legend = NULL;
else
......@@ -597,6 +602,10 @@ cmd_logexpect(CMD_ARGS)
av++;
continue;
}
if (!strcmp(*av, "-m")) {
le->m_arg = !le->m_arg;
continue;
}
if (!strcmp(*av, "-start")) {
logexp_start(le);
continue;
......
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