]> git.ipfire.org Git - thirdparty/squid.git/commit - src/log/Makefile.am
SourceLayout: cleanup the various log line formatting code
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 12 Dec 2010 05:30:58 +0000 (22:30 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 12 Dec 2010 05:30:58 +0000 (22:30 -0700)
commit20efa1c285cf589c5e289fd4f07bf41ef3564fd6
tree50efc98c42910048ccb6e3ce12b76f316eddd064
parent83ddbaf4fbdf7c5756dad152c55265c62632c088
SourceLayout: cleanup the various log line formatting code

Adds:

* namespace Log::Format for log display functionality. Each line formater
  is a global function inside here. The log format enum is also in here
  along with the display encoding 'gadget' functions.

* namespace Time in SquidTime.h for the related time string display
  functions. Unified the various log pretty-print httpd-style time
  functions into Time::FormatHttpd(time_t).
 ** care has been taken to preserve the local-static optimization found
    in accessLogTime() to prevent wasted cycles re-printing the same
    time value more than once per second.

NP: the similar but timezone-missing format is now Time::FormatStrf()
    with the same optimization applied to speed up its callers.

* namespace Math:: to avoid symbol clash with global function Log() and
  namespace Log.

* support for the Apache "combined" log format. Was documented earlier as
  being available but not actually present.

Obsoletes:

* forward_log directive and associated experimental code. If needed
  we can easily add another special format to dump the details.
  FWIW they are all available in the squid format anyway (timestamp,
  squid status, source peer). The documented action of dumping every
  forwarding attempt was not working.

* referer_log and useragent_log directives and matching ./configure options.
 ** shuffled into access_log formats "referrer" and "useragent" for more
    flexibility with less directives.

* emulate_httpd_log replaced with Apache "common" format.

* the "auto" pseudo-format becomes obsolete with emulat_httpd_log.
  default is now "squid" format in all situations.

Code Shuffles:

* moved the logformat directive parsing into LogConfig object methods.

* shuffled the logformat parsing and token code into src/log/Tokens.h|cc
 ** this is purely to break it out of access_log.cc. namespace and scoping
    needs some work.
41 files changed:
configure.ac
doc/debug-sections.txt
doc/release-notes/release-3.2.sgml
lib/rfc1123.c
src/Makefile.am
src/SquidTime.h
src/StatHist.cc
src/adaptation/icap/icap_log.cc
src/cache_cf.cc
src/cf.data.pre
src/cf_gen_defines
src/client_side_request.cc
src/enums.h
src/errorpage.cc
src/forward.cc
src/forward.h
src/helper.cc
src/http.cc
src/log/Config.cc
src/log/Config.h
src/log/FormatHttpdCombined.cc [new file with mode: 0644]
src/log/FormatHttpdCommon.cc [new file with mode: 0644]
src/log/FormatSquidCustom.cc [new file with mode: 0644]
src/log/FormatSquidIcap.cc [new file with mode: 0644]
src/log/FormatSquidNative.cc [new file with mode: 0644]
src/log/FormatSquidReferer.cc [moved from src/referer.cc with 59% similarity]
src/log/FormatSquidUseragent.cc [moved from src/useragent.cc with 55% similarity]
src/log/Formats.h [new file with mode: 0644]
src/log/Gadgets.cc [new file with mode: 0644]
src/log/Gadgets.h [new file with mode: 0644]
src/log/Makefile.am
src/log/Tokens.cc [new file with mode: 0644]
src/log/Tokens.h [new file with mode: 0644]
src/log/access_log.cc
src/main.cc
src/neighbors.cc
src/protos.h
src/send-announce.cc
src/structs.h
src/time.cc
src/typedefs.h