<div dir="ltr">Hello ,<div><br></div><div>I Would like to Split my Varnish logs into   access log and error log file : </div><div><br></div><div>I Know I can reach my goal   by command line using   varnishncsa :</div><div> </div><div>---</div><div><i>usr/bin/varnishncsa  -c -b -a -w /var/log/varnish/access-varnishncsa.log -D  -f /etc/varnish/varnishncsa_logmatic.format -q 'RespStatus < 400' &&  /usr/bin/varnishncsa  -c -b -a -w /var/log/varnish/error-varnishncsa.log -D  -f /etc/varnish/varnishncsa_logmatic.format -q 'RespStatus > 399'</i><br><div>---</div><div><br></div><div>I am looking now to edit my varnishncsa unit file so i can do the same using systemd :</div><div><i><br></i></div><div>This is my actual  unit file with one Varnishncsa instance :</div><div><i>---</i></div><div><i>[Unit]<br>Description=Varnish HTTP accelerator log daemon<br>Documentation=<a href="https://www.varnish-cache.org/docs/4.1/">https://www.varnish-cache.org/docs/4.1/</a> man:varnishncsa<br>After=varnish.service<br><br>[Service]<br>Type=forking<br>PIDFile=/run/varnishncsa/varnishncsa.pid<br>RuntimeDirectory=varnishncsa<br>User=varnishlog<br>Group=varnish<br>ExecStart=/usr/bin/varnishncsa  -c -b -a -w /var/log/varnish/access-varnishncsa.log -D  -f /etc/varnish/varnishncsa_logmatic.format<br>ExecReload=/bin/kill -HUP $MAINPID<br>PrivateDevices=true<br>PrivateTmp=true<br>ProtectHome=true<br>ProtectSystem=full<br><br>[Install]<br>WantedBy=multi-user.target</i><br>                        <br></div><div>---</div><div><br></div><div>What is the best practice to do so ?  </div><div>Can I use the same  one unit file  and use a one shot exec start ? Or should I split unit files and run two different systemd varnishncsa services (instances)?<br></div><div><br></div><div><br></div><div>Regards,</div><div><br></div><div>Yassine Aouadi</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div>