Index: varnishncsa.c
===================================================================
--- varnishncsa.c	(revision 4022)
+++ varnishncsa.c	(working copy)
@@ -102,6 +102,7 @@
 
 static size_t nll;
 static int prefer_x_forwarded_for = 0;
+static int virtual_host_style_logging = 0;
 
 static int
 isprefix(const char *str, const char *prefix, const char *end,
@@ -399,6 +400,11 @@
 	if (!lp->bogus) {
 		fo = priv;
 
+                /* the -v option */
+                if(virtual_host_style_logging) {
+                        fprintf(fo, "%s ", lp->df_Host);
+                }
+
 		/* %h */
 		if (!lp->df_h && spec & VSL_S_BACKEND)
 			fprintf(fo, "127.0.0.1 ");
@@ -531,7 +537,7 @@
 
 	vd = VSL_New();
 
-	while ((c = getopt(argc, argv, VSL_ARGS "aDn:P:Vw:f")) != -1) {
+	while ((c = getopt(argc, argv, VSL_ARGS "avDn:P:Vw:f")) != -1) {
 		switch (c) {
 		case 'a':
 			a_flag = 1;
@@ -539,6 +545,9 @@
 		case 'f':
 			prefer_x_forwarded_for = 1;
 			break;
+                case 'v':
+                        virtual_host_style_logging = 1;
+                        break;
 		case 'D':
 			D_flag = 1;
 			break;
