Re: [PATCH] meta_header option

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Thu, 11 Oct 2012 09:05:31 -0600

On 10/11/2012 05:21 AM, Amos Jeffries wrote:
> On 11/10/2012 9:39 p.m., Tsantilas Christos wrote:
>> If there is not any objection I will commit this patch to trunk
>>
>>
>> On 09/19/2012 06:46 PM, Tsantilas Christos wrote:
>>> Hi all,
>>>
>>> This patch adds meta_header option to squid.conf. It is similar to
>>> adaptation_meta but is applied after all adaptation and before logging.
>>> Values of named meta headers can be logged using %{name}meta_header
>>> macros.
>>>
>>> meta_header name value acl ...
>>> logformat myFormat ... %{name}meta_header ...
>>>
>>> This option may be initially used to log custom information about the
>>> master transaction. For example, an admin may configure Squid to log
>>> which "user group" the transaction belongs to, where "user group" will
>>> be determined based on a set of ACLs and not [just] authentication
>>> information.
>>>
>>> From user point of view, adaptation_header sets/implies meta_header
>>> (i.e., setting adaptation_header is sufficient to be able to log it
>>> using %meta_header) but the meta_header option itself (if any) is
>>> evaluated later, so it has no effect on ICAP headers.
>>>
>>> This is a Measurement Factory project
>>>
>
> Thank you for your explanation earlier. If you can avoid calling the
> list of key:pair entries *headers* it would be less confusing.

Here are a few other naming options to consider, from the ones I like
the most to the ones I like the least:

1a) annotation key value ...
    logformat ... %{key}annotation ...

1b) note key value ...
    logformat ... %{key}note ...

2a) marker key value ...
    logformat ... %{key}marker ...

2b) mark key value ...
    logformat ... %{key}mark ...

3) stamp key value ...
    logformat ... %{key}stamp ...

4) label key value ...
    logformat ... %{key}label

5) info key value ...
    logformat ... %{key}info

All of which can be prefixed with "meta_", "xaction_", or "master_"
prefixes (with varying degree of appropriateness).

All of these names have some problems, as does the original meta_header,
of course.

Do you like any of the above? Any better ideas?

Thank you,

Alex.
Received on Thu Oct 11 2012 - 15:05:34 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 12 2012 - 12:00:05 MDT