Hi,
If anyone knows how to change the format of the log in webproxy based on squid in vyos?
Webproxy feature works very well but the time mark in logs are useless - it shows start time, not real local time of action.
In normal squid we can modify squid.conf file by adding: logformat squid %tl %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
when we use squid template as default: access_log /var/log/squid/access.log squid
But when I’m doing this in vyos, it does not takes any effect (of course I restarted squid service).
And the other thing: after modification and saving squid.conf file in vyos, the modified file remains to restart vyos - after system restart, it again is the default.
A reasonable method for vyos to support custom configs without needing CLI support is to have /etc/squid/squid.conf include a config file in the persistent config location (/opt/vyatta/etc/config).
To get something working, you could write a simple daemon that is started by /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script that ensures a required line exists in /etc/squid/squid.conf and performs a squid init reload.
I should have been clearer when I said persistent. I meant persistent across image upgrades. Your change will survive reboots, but not an image upgrade.
Changes made on boot or a daemon launched from /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script will continue to work after an image upgrade.
Not sure why the combined option doesn’t work. Glad you got something working though.