]> git.ipfire.org Git - thirdparty/squid.git/commit
Logformat annotation fixes
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 2 May 2014 07:51:33 +0000 (00:51 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 2 May 2014 07:51:33 +0000 (00:51 -0700)
commitd01ea2048517315c3446b780dc1dc0f00abf3b61
tree8f914adda5b0cf16521f98ab47920513f541dabc
parent00717f21b8111f4f309f07077bcd36e15b9beac6
Logformat annotation fixes

Currently note values printed with "%note" formating code, which contain non
alphanumeric characters, were quoted and quotes were then escaped, resulting
in bizarre logged rendition of empty or simple values (often received from
various helpers):
      %22-%22
      %22Default_Google%22
      %22pg13,US%22

This patch:
- does not use quotes to print annotations

- allow system admin to define a separator to use for logged
  annotations. The %note logformat accepts the following argument:
     [name][:separator]
  The separator can be one of the ',' ';' or ':'.
  By default, multiple note values are separated with "," and multiple
  notes are separated with "\r\n". When logging named notes with
  %{name}note, the explicitly configured separator is used between note
  values. When logging all notes with %note, the explicitly configured
  separator is used between individual notes. There is currently no way to
  specify both value and notes separators when logging all notes with %note.

- makes the Format::Token::data a struct (now is a union) and initialize
  Format::Token::data data members in Format::Token::Token constructor.

This is a Measurement Factory project
src/Notes.cc
src/Notes.h
src/cf.data.pre
src/format/Format.cc
src/format/Token.cc
src/format/Token.h