[master] 1f32c1597 varnishlog: When writing binary logs, always include Begin/End/Link tags
Nils Goroll
nils.goroll at uplex.de
Thu Jan 24 16:20:11 UTC 2019
commit 1f32c1597a0927e3cd0f728069613e3377572a83
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Jan 24 17:18:14 2019 +0100
varnishlog: When writing binary logs, always include Begin/End/Link tags
Closes #2852
diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c
index 09f8983d5..b6a76d7df 100644
--- a/bin/varnishlog/varnishlog.c
+++ b/bin/varnishlog/varnishlog.c
@@ -142,10 +142,15 @@ main(int argc, char * const *argv)
VUT_Error(vut, 1, "Missing -w option");
/* Setup output */
- if (LOG.A_opt || !LOG.w_arg)
+ if (LOG.A_opt || !LOG.w_arg) {
vut->dispatch_f = VSL_PrintTransactions;
- else
+ } else {
vut->dispatch_f = VSL_WriteTransactions;
+ // inefficient but not crossing API layers
+ AN(VUT_Arg(vut, 'i', "Link"));
+ AN(VUT_Arg(vut, 'i', "Begin"));
+ AN(VUT_Arg(vut, 'i', "End"));
+ }
if (LOG.w_arg) {
openout(LOG.a_opt);
AN(LOG.fo);
More information about the varnish-commit
mailing list