On current stable www-servers/varnish ebuild, you cannot define your own logformat using the -F option to VARNISHNCSA_ARGS. For exemple, if you want to define the following LogFormat : %h %{X-Forwarded-For}i %{Host}i %u %t %{Varnish:handling}x %{Varnish:hitmiss}x %s %b "%m %U%q %H" Then you define VARNISHNCSA_ARGS="-a -w /var/log/varnish/access.log -F '%h %{X-Forwarded-For}i %{Host}i %u %t %{Varnish:handling}x %{Varnish:hitmiss}x %s %b "%m %U%q %H"'" Restart varnish, you get the following : # /etc/init.d/varnishd * Caching service dependencies ... /etc/init.d/../conf.d/varnishd: line 11: fg: no job control [ ok /etc/init.d/../conf.d/varnishd: line 11: fg: no job control * Stopping varnish ... [ ok * Stopping varnish logging ... [ ok /etc/init.d/../conf.d/varnishd: line 11: fg: no job control * Starting varnish ... And varnishncsa is not started If you define use double quotes over -F : VARNISHNCSA_ARGS="-a -w /var/log/varnish/access.log -F \"%h %{X-Forwarded-For}i %{Host}i %u %t %{Varnish:handling}x %{Varnish:hitmiss}x %s %b '%m %U%q %H'\"" Then it start correctly, but you get the following logs : "10.90.69.66 "10.90.69.66 "10.90.69.66 "10.90.69.66 # tr '\0' ';' < /proc/29819/cmdline ; echo /usr/bin/varnishncsa;-D;-P;/var/run/varnishncsa.pid;-a;-w;/var/log/varnish/access.log;-F;"%h;%{X-Forwarded-For}i;%{Host}i;%u;%t;%{Varnish:handling}x;%{Varnish:hitmiss}x;%s;%b;'%m;%U%q;%H'"; Here, each argument to -F is a different ARGV, while the whole LogFormat should be a single ARGV. The current situation happend because in /etc/init.d/varnishd ${VARNISHNCSA_ARGS} is use unquoted, but it should not be. Here is a patch that add a variable to conf.d, VARNISHNCSA_LOGFORMAT that permit us to override this madness. The patch also replace /var/run with /run and wrap lines Reproducible: Always
Created attachment 371396 [details, diff] conf.d & init.d patch
This is in the tree with varnish-3.0.5-r4. Please test and if there's anything wrong, please reopen this bug.
(In reply to Anthony Basile from comment #2) > This is in the tree with varnish-3.0.5-r4. Please test and if there's > anything wrong, please reopen this bug. Everything OK for me. Thanks
(In reply to Bertrand Jacquin from comment #3) > (In reply to Anthony Basile from comment #2) > > This is in the tree with varnish-3.0.5-r4. Please test and if there's > > anything wrong, please reopen this bug. > > Everything OK for me. > > Thanks Except that Manifest is not complete.
(In reply to Bertrand Jacquin from comment #4) > (In reply to Bertrand Jacquin from comment #3) > > (In reply to Anthony Basile from comment #2) > > > This is in the tree with varnish-3.0.5-r4. Please test and if there's > > > anything wrong, please reopen this bug. > > > > Everything OK for me. > > > > Thanks > > Except that Manifest is not complete. Please explain. I just check the manifest here and its fine.
(In reply to Anthony Basile from comment #5) > (In reply to Bertrand Jacquin from comment #4) > > (In reply to Bertrand Jacquin from comment #3) > > > (In reply to Anthony Basile from comment #2) > > > > This is in the tree with varnish-3.0.5-r4. Please test and if there's > > > > anything wrong, please reopen this bug. > > > > > > Everything OK for me. > > > > > > Thanks > > > > Except that Manifest is not complete. > > Please explain. I just check the manifest here and its fine. !!! A file listed in the Manifest could not be found: /usr/portage/www-servers/varnish/files/varnishd.initd-r2.orig
(In reply to Bertrand Jacquin from comment #6) > (In reply to Anthony Basile from comment #5) > > (In reply to Bertrand Jacquin from comment #4) > > > (In reply to Bertrand Jacquin from comment #3) > > > > (In reply to Anthony Basile from comment #2) > > > > > This is in the tree with varnish-3.0.5-r4. Please test and if there's > > > > > anything wrong, please reopen this bug. > > > > > > > > Everything OK for me. > > > > > > > > Thanks > > > > > > Except that Manifest is not complete. > > > > Please explain. I just check the manifest here and its fine. > > !!! A file listed in the Manifest could not be found: > /usr/portage/www-servers/varnish/files/varnishd.initd-r2.orig Yeah something strange happened because I didn't have that at my end. I always use repoman that's supposed to catch violations like this. Anyhow, I recommitted the Manifest. Let me know if it continues.