63 Resuming indexing cache_dir # ... from ...
64 DNS IPv4 socket created at ..., FD ...
65 WARNING: Indexer ignores a cache_dir entry: ...
+66 WARNING: BCP 177 violation. Detected non-functional IPv6 loopback.
+67 WARNING: BCP 177 violation. IPv6 transport forced OFF by build parameters.
+68 Processing Configuration File: ... (depth ...)
\endverbatim
*/
void
Auth::Init()
{
- debugs(29,DBG_IMPORTANT,"Startup: Initializing Authentication Schemes ...");
+ debugs(29, 2, "Initializing Authentication Schemes ...");
#if HAVE_AUTH_MODULE_BASIC
static const char *basic_type = Auth::Basic::Scheme::GetInstance()->type();
- debugs(29,DBG_IMPORTANT,"Startup: Initialized Authentication Scheme '" << basic_type << "'");
+ debugs(29, 2, "Initialized Authentication Scheme '" << basic_type << "'");
#endif
#if HAVE_AUTH_MODULE_DIGEST
static const char *digest_type = Auth::Digest::Scheme::GetInstance()->type();
- debugs(29,DBG_IMPORTANT,"Startup: Initialized Authentication Scheme '" << digest_type << "'");
+ debugs(29, 2, "Initialized Authentication Scheme '" << digest_type << "'");
#endif
#if HAVE_AUTH_MODULE_NEGOTIATE
static const char *negotiate_type = Auth::Negotiate::Scheme::GetInstance()->type();
- debugs(29,DBG_IMPORTANT,"Startup: Initialized Authentication Scheme '" << negotiate_type << "'");
+ debugs(29, 2, "Initialized Authentication Scheme '" << negotiate_type << "'");
#endif
}
int connect_gap;
int connect_timeout;
} happyEyeballs;
-
- DebugMessages *debugMessages; ///< cache_log_message
};
extern SquidConfig Config;
writeableCfg().secure.encryptTransport = true;
if (cfg().secure.encryptTransport) {
- debugs(3, DBG_IMPORTANT, "Initializing service " << cfg().resource << " SSL context");
+ debugs(3, 2, "initializing service " << cfg().resource << " SSL context");
sslContext = writeableCfg().secure.createClientContext(true);
}
int err_count = 0;
int is_pipe = 0;
- debugs(3, DBG_IMPORTANT, "Processing Configuration File: " << file_name << " (depth " << depth << ")");
+ debugs(3, Important(68), "Processing Configuration File: " << file_name << " (depth " << depth << ")");
if (depth > 16) {
fatalf("WARNING: can't include %s: includes are nested too deeply (>16)!\n", file_name);
return 1;
#endif
if (Security::ProxyOutgoingConfig.encryptTransport) {
- debugs(3, DBG_IMPORTANT, "Initializing https:// proxy context");
+ debugs(3, 2, "initializing https:// proxy context");
Config.ssl_client.sslContext = Security::ProxyOutgoingConfig.createClientContext(false);
if (!Config.ssl_client.sslContext) {
#if USE_OPENSSL
p->secure.sslDomain = p->host;
if (p->secure.encryptTransport) {
- debugs(3, DBG_IMPORTANT, "Initializing TLS context for cache_peer " << *p);
+ debugs(3, 2, "initializing TLS context for cache_peer " << *p);
p->sslContext = p->secure.createClientContext(true);
if (!p->sslContext) {
debugs(3, DBG_CRITICAL, "ERROR: Could not initialize TLS context for cache_peer " << *p);
for (AnyP::PortCfgPointer s = HttpPortList; s != nullptr; s = s->next) {
if (!s->secure.encryptTransport)
continue;
- debugs(3, DBG_IMPORTANT, "Initializing " << AnyP::UriScheme(s->transport.protocol) << "_port " << s->s << " TLS contexts");
+ debugs(3, 2, "initializing " << AnyP::UriScheme(s->transport.protocol) << "_port " << s->s << " TLS contexts");
s->secure.initServerContexts(*s);
}
TYPE: cache_log_message
DEFAULT: none
DEFAULT_DOC: Use debug_options.
-LOC: Config.debugMessages
+LOC: DebugMessagesConfig
DOC_START
Configures logging of individual cache.log messages.
#define SQUID_DEBUG_MESSAGES_H
#include "debug/Stream.h"
-#include "SquidConfig.h"
#include <array>
#include <limits>
};
/// The maximum used DebugMessage::id plus 1. Increase as you add new IDs.
-constexpr DebugMessageId DebugMessageIdUpperBound = 66;
+constexpr DebugMessageId DebugMessageIdUpperBound = 69;
/// a collection of DebugMessage objects (with fast access by message IDs)
class DebugMessages
Storage messages;
};
+/// Global configuration for DebugMessageLevel() (where/when supported).
+inline DebugMessages *DebugMessagesConfig = nullptr;
+
// Using a template allows us to check message ID range at compile time.
/// \returns configured debugging level for the given message or defaultLevel
template <DebugMessageId id>
{
static_assert(id > 0, "debugs() message ID must be positive");
static_assert(id < DebugMessageIdUpperBound, "debugs() message ID must be smaller than DebugMessageIdUpperBound");
- if (const auto configured = Config.debugMessages)
+ if (const auto configured = DebugMessagesConfig)
return (configured->messages)[id].currentLevel(defaultLevel);
return defaultLevel;
}
/* DEBUG: section 21 Misc Functions */
#include "squid.h"
-#include "debug/Stream.h"
+#include "debug/Messages.h"
#include "ip/Address.h"
#include "ip/tools.h"
struct sockaddr_in6 sin;
ip.getSockAddr(sin);
if (bind(s, reinterpret_cast<struct sockaddr *>(&sin), sizeof(sin)) != 0) {
- debugs(3, DBG_CRITICAL, "WARNING: BCP 177 violation. Detected non-functional IPv6 loopback.");
+ debugs(3, Critical(66), "WARNING: BCP 177 violation. Detected non-functional IPv6 loopback.");
EnableIpv6 = IPV6_OFF;
} else {
debugs(3, 2, "Detected functional IPv6 loopback ...");
#else
debugs(3, 2, "IPv6 transport " << (EnableIpv6?"Available":"Disabled"));
if (EnableIpv6 != IPV6_OFF) {
- debugs(3, DBG_CRITICAL, "WARNING: BCP 177 violation. IPv6 transport forced OFF by build parameters.");
+ debugs(3, Critical(67), "WARNING: BCP 177 violation. IPv6 transport forced OFF by build parameters.");
EnableIpv6 = IPV6_OFF;
}
#endif
bool
Security::KeyData::loadCertificates()
{
- debugs(83, DBG_IMPORTANT, "Using certificate in " << certFile);
+ debugs(83, 2, "from " << certFile);
cert.reset(); // paranoid: ensure cert is unset
#if USE_OPENSSL
bool
Security::KeyData::loadX509PrivateKeyFromFile()
{
- debugs(83, DBG_IMPORTANT, "Using key in " << privateKeyFile);
+ debugs(83, 2, "from " << privateKeyFile);
#if USE_OPENSSL
const char *keyFilename = privateKeyFile.c_str();
// TODO: support loading multiple cert/key pairs
auto &keys = peer.certs.front();
if (!keys.certFile.isEmpty()) {
- debugs(83, DBG_IMPORTANT, "Using certificate in " << keys.certFile);
+ debugs(83, 2, "loading client certificate from " << keys.certFile);
const char *certfile = keys.certFile.c_str();
if (!SSL_CTX_use_certificate_chain_file(ctx.get(), certfile)) {
certfile, Security::ErrorString(ssl_error));
}
- debugs(83, DBG_IMPORTANT, "Using private key in " << keys.privateKeyFile);
+ debugs(83, 2, "loading private key from " << keys.privateKeyFile);
const char *keyfile = keys.privateKeyFile.c_str();
ssl_ask_password(ctx.get(), keyfile);