Commit abad6f99 authored by Ad Schellevis's avatar Ad Schellevis

proxy, add extended file logging option for https://github.com/opnsense/core/issues/1507

parent 622e8dba
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<Required>N</Required> <Required>N</Required>
<BlankDesc>File</BlankDesc> <BlankDesc>File</BlankDesc>
<OptionValues> <OptionValues>
<file_extendend>File (Extended)</file_extendend>
<syslog>Syslog</syslog> <syslog>Syslog</syslog>
</OptionValues> </OptionValues>
</target> </target>
......
...@@ -332,6 +332,9 @@ acl accesslog_ignore src {{ OPNsense.proxy.general.logging.ignoreLogACL.replace( ...@@ -332,6 +332,9 @@ acl accesslog_ignore src {{ OPNsense.proxy.general.logging.ignoreLogACL.replace(
{% endif %} {% endif %}
{% if OPNsense.proxy.general.logging.target|default('') == 'syslog' %} {% if OPNsense.proxy.general.logging.target|default('') == 'syslog' %}
access_log syslog:local4.info {% if OPNsense.proxy.general.logging.ignoreLogACL|default('') %}!accesslog_ignore {% endif %} access_log syslog:local4.info {% if OPNsense.proxy.general.logging.ignoreLogACL|default('') %}!accesslog_ignore {% endif %}
{% elif OPNsense.proxy.general.logging.target|default('') == 'file_extendend' %}
logformat opnsense %>a %[ui %>eui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
access_log /var/log/squid/access.log opnsense {% if OPNsense.proxy.general.logging.ignoreLogACL|default('') %}!accesslog_ignore {% endif %}
{% else %} {% else %}
access_log /var/log/squid/access.log squid {% if OPNsense.proxy.general.logging.ignoreLogACL|default('') %}!accesslog_ignore {% endif %} access_log /var/log/squid/access.log squid {% if OPNsense.proxy.general.logging.ignoreLogACL|default('') %}!accesslog_ignore {% endif %}
{% endif %} {% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment