]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Support logformat %macros in external_acl_type format
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 11 Oct 2015 14:08:47 +0000 (07:08 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 11 Oct 2015 14:08:47 +0000 (07:08 -0700)
Update the external_acl_type helper interface to use libformat and thus
make any logformat token valid in its format parameter field.

As a result much of the logic surrounding format code parsing, display
and helper query generation has been completely dropped. What remains is
a basic parse loop handling backward compatibility for the unusual
%CERT_* token syntax, space delimiter and field default encodings.

Extensions to logformat resulting from the merger:

* adds \-escape encoding of output fields

* allows {arg} field to be placed before or after the format code.

* extended to accept the old external_acl_type %macros. But not
  documented, these are deprecated and only for backward compatibility.

* extended to support outputting formats without a format-name prefix
  as was required by the original logformat config lines.

The major side effect of this change is that these ACLs now require
AccessLogEntry to be filled out with state data, rather than just the
ACLChecklist object members.

The requires*() mechanism of ACLChecklist has been extended to catch
some cases resulting from missing the ALE entirely. But it cannot catch
the more subtle problem of data members inside the ALE being unset.
To try and catch those a syncAle() mechanism has been added that fills
out missing ALE members and prints out debug warnings about the action.

1  2 
src/cf.data.pre

diff --cc src/cf.data.pre
Simple merge