From: Amos Jeffries Date: Sun, 11 Oct 2015 14:08:47 +0000 (-0700) Subject: Support logformat %macros in external_acl_type format X-Git-Tag: SQUID_4_0_1~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd6b1fd1bd9fc68574035857d649b85ba8713e3f;p=thirdparty%2Fsquid.git Support logformat %macros in external_acl_type format 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. --- cd6b1fd1bd9fc68574035857d649b85ba8713e3f