]> git.ipfire.org Git - thirdparty/squid.git/commit - src/cf.data.pre
cache_log_message directive (#775)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Fri, 11 Jun 2021 13:24:04 +0000 (13:24 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 11 Jun 2021 13:24:08 +0000 (13:24 +0000)
commitc59baaa84bb320c7ef99275b078d5b8769b52e8f
treec4daa8428906f3145451919ea450024469e3617a
parentb6388dfd130c7c2f050df2d37337d65157d31247
cache_log_message directive (#775)

This directive controls cache.log printing of important messages.

Rationale: In any given deployment environment, many of the cache.log
messages that Squid logs by default are noise. Some of them should
probably never be logged by default, but some are useful or even
critical in certain other environments. No single approach to logging is
going to satisfy all needs. The existing debug_options directive
operates on large message groups and is not suitable for controlling
individual critical or important messages.

The current implementation uses hard-coded manually-assigned opaque
message IDs. We have also experimented with an automated generation of
message IDs, including meaningful IDs and compiler-generated IDs created
by various advanced C++ preprocessing and template tricks. All of the
automation considered (and some partially implemented) were rejected
for being overall worse than the current manual approach.

TODO: The usefulness of ID ranges will diminish with time. We could
support named (hard-coded) sets of message IDs (e.g., "startup",
"shutdown", and "configuration"). However, sets make it easier to
accidentally suppress an important new message during an upgrade.
35 files changed:
doc/Makefile.am
doc/debug-messages.dox [new file with mode: 0644]
scripts/source-maintenance.sh
src/DebugMessages.h [new file with mode: 0644]
src/Instance.cc
src/LoadableModules.cc
src/Makefile.am
src/Parsing.cc
src/Parsing.h
src/SquidConfig.h
src/acl/FilledChecklist.cc
src/adaptation/Config.cc
src/auth/basic/Scheme.cc
src/auth/digest/Scheme.cc
src/auth/negotiate/Scheme.cc
src/auth/ntlm/Scheme.cc
src/cache_cf.cc
src/cf.data.depend
src/cf.data.pre
src/client_side.cc
src/debug.cc
src/dns_internal.cc
src/fd.cc
src/fs/rock/RockRebuild.cc
src/helper.cc
src/htcp.cc
src/ipcache.cc
src/log/File.cc
src/main.cc
src/mime.cc
src/neighbors.cc
src/store.cc
src/store/Disks.cc
src/store_log.cc
src/store_rebuild.cc