main(int argc, char **argv)
{
int c;
- int a_flag = 0, D_flag = 0, o_flag = 0;
+ int a_flag = 0, D_flag = 0, o_flag = 0, u_flag = 0;
const char *n_arg = NULL;
const char *P_arg = NULL;
const char *w_arg = NULL;
vd = VSL_New();
- while ((c = getopt(argc, argv, VSL_ARGS "aDon:P:Vw:")) != -1) {
+ while ((c = getopt(argc, argv, VSL_ARGS "aDon:P:uVw:")) != -1) {
switch (c) {
case 'a':
a_flag = 1;
case 'P':
P_arg = optarg;
break;
+ case 'u':
+ u_flag = 1;
+ break;
case 'V':
varnish_version("varnishlog");
exit(0);
if (o_flag)
do_order(vd, argc - optind, argv + optind);
+ if (u_flag)
+ setbuf(stdout, NULL);
+
while (VSL_Dispatch(vd, VSL_H_Print, stdout) >= 0) {
if (fflush(stdout) != 0) {
perror("stdout");