[Varnish] #760: varnishlog unbuffered output
Varnish
varnish-bugs at varnish-cache.org
Mon Aug 23 16:56:18 CEST 2010
#760: varnishlog unbuffered output
------------------------+---------------------------------------------------
Reporter: blade106 | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishlog | Version: 2.1.3
Severity: normal | Keywords: varnishlog output
------------------------+---------------------------------------------------
In varnishlog, there's an option «-u» to set the output unbuffered. But
this option can't be used if the «-o» (Group log entries by request ID) is
used. This can be fixed by inverting the two options in the varnishlog.c.
Current code (near line 387):
{{{
if (o_flag)
do_order(vd, argc - optind, argv + optind);
if (u_flag)
setbuf(stdout, NULL);
}}}
New working code:
{{{
if (u_flag)
setbuf(stdout, NULL);
if (o_flag)
do_order(vd, argc - optind, argv + optind);
}}}
As I'm not a C coder, I don't know if there's any issue inverting these,
but for the 4 past months I've used it and nothing went wrong.
--
Ticket URL: <http://varnish-cache.org/ticket/760>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list