]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceLayout: Move debugs()-related code into src/debug/ (#984)
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 22 Feb 2022 21:58:02 +0000 (21:58 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 23 Feb 2022 11:22:36 +0000 (11:22 +0000)
The new library is needed to facilitate debugs() reuse and, perhaps more
importantly, reuse of other Squid code that already uses debugs() -- all
without build-breaking hacks of copying debug.cc source files and very
dangerous stub use in production running code.

The Raw class, asHex(), and other I/O manipulators are not specific to
debugs() streams. They are now in src/base/.

Also removed test-suite/debug, addressing an XXX. That test was
misplaced and not really doing anything useful -- the compiler already
tests what test-suite/debug was testing (and much more).

Also removed the no longer necessary xassert() stub from test-suite/.

TODO: Adjust the moved code to use Debug namespace. Those adjustments
are likely to trigger debug/Stream.h reorganization, simplifying exposed
debugging API. They deserve a dedicated PR.

TODO: Convert more helpers to use the new debugging library. This change
only adjusts pinger because that adjustment did not require other
significant changes.

196 files changed:
configure.ac
include/unitTestMain.h
src/AuthReg.cc
src/BandwidthBucket.cc
src/ConfigParser.cc
src/CpuAffinity.cc
src/CpuAffinityMap.cc
src/CpuAffinitySet.cc
src/DiskIO/AIO/AIODiskFile.cc
src/DiskIO/Blocking/BlockingFile.cc
src/DiskIO/Mmapped/MmappedFile.cc
src/Downloader.cc
src/EventLoop.cc
src/FadingCounter.cc
src/HttpHdrContRange.cc
src/HttpHeader.cc
src/Instance.cc
src/LoadableModules.cc
src/LogTags.cc
src/Makefile.am
src/Parsing.cc
src/PeerPoolMgr.cc
src/Pipeline.cc
src/SquidString.h
src/StoreIOState.cc
src/StoreMetaUnpacker.cc
src/WinSvc.cc
src/XactionInitiator.cc
src/acl/Acl.cc
src/acl/AdaptationServiceData.cc
src/acl/AnnotationData.cc
src/acl/Arp.cc
src/acl/AtStepData.cc
src/acl/BoolOps.cc
src/acl/CertificateData.cc
src/acl/Checklist.cc
src/acl/ConnMark.cc
src/acl/ConnectionsEncrypted.cc
src/acl/DomainData.cc
src/acl/Eui64.cc
src/acl/FilledChecklist.cc
src/acl/HttpHeaderData.cc
src/acl/HttpStatus.cc
src/acl/InnerNode.cc
src/acl/IntRange.cc
src/acl/Ip.cc
src/acl/MaxConnection.cc
src/acl/NoteData.cc
src/acl/Options.cc
src/acl/ProtocolData.cc
src/acl/Random.cc
src/acl/RegexData.cc
src/acl/SquidErrorData.cc
src/acl/StringData.cc
src/acl/TimeData.cc
src/acl/TransactionInitiator.cc
src/acl/UserData.cc
src/adaptation/AccessRule.cc
src/adaptation/Config.cc
src/adaptation/History.cc
src/adaptation/ServiceConfig.cc
src/adaptation/ServiceGroups.cc
src/adaptation/ecap/ServiceRep.cc
src/adaptation/icap/Client.cc
src/adaptation/icap/History.cc
src/adaptation/icap/ServiceRep.cc
src/anyp/Uri.cc
src/auth/AclMaxUserIp.cc
src/auth/CredentialsCache.cc
src/auth/SchemeConfig.cc
src/auth/basic/Scheme.cc
src/auth/basic/User.cc
src/auth/basic/UserRequest.cc
src/auth/digest/Scheme.cc
src/auth/digest/User.cc
src/auth/negotiate/Scheme.cc
src/auth/negotiate/User.cc
src/auth/ntlm/Scheme.cc
src/auth/ntlm/User.cc
src/base/AsyncCall.cc
src/base/AsyncCallQueue.cc
src/base/AsyncJobCalls.h
src/base/CbcPointer.h
src/base/CodeContext.cc
src/base/File.cc
src/base/IoManip.cc [new file with mode: 0644]
src/base/IoManip.h [new file with mode: 0644]
src/base/Makefile.am
src/base/Raw.cc [new file with mode: 0644]
src/base/Raw.h [new file with mode: 0644]
src/base/RegexPattern.cc
src/base/RunnersRegistry.cc
src/base/YesNoNone.h
src/base/forward.h
src/cache_cf.cc
src/cache_manager.cc
src/client_side.cc
src/clients/HttpTunneler.cc
src/comm/Read.cc
src/comm/Tcp.cc
src/debug/Makefile.am [new file with mode: 0644]
src/debug/Messages.h [moved from src/DebugMessages.h with 99% similarity]
src/debug/Stream.h [moved from src/Debug.h with 69% similarity]
src/debug/debug.cc [moved from src/debug.cc with 96% similarity]
src/dns_internal.cc
src/error/Error.cc
src/esi/Element.h
src/esi/Expression.cc
src/esi/Parser.cc
src/esi/Segment.cc
src/esi/Sequence.cc
src/eui/Eui48.cc
src/eui/Eui64.cc
src/fatal.cc
src/fd.cc
src/fde.cc
src/filemap.cc
src/format/Config.cc
src/fs/rock/RockHeaderUpdater.cc
src/fs/rock/RockRebuild.cc
src/fs/ufs/UFSSwapLogParser.cc
src/helper.cc
src/helper/ChildConfig.cc
src/helper/Reply.cc
src/htcp.cc
src/http.cc
src/http/ContentLengthInterpreter.cc
src/http/Message.cc
src/http/StatusCode.cc
src/http/StatusLine.cc
src/http/one/Parser.cc
src/http/one/RequestParser.cc
src/http/one/ResponseParser.cc
src/http/one/TeChunkedParser.cc
src/http/one/Tokenizer.cc
src/icmp/Icmp.cc
src/icmp/Icmp4.cc
src/icmp/Icmp6.cc
src/icmp/IcmpPinger.cc
src/icmp/Makefile.am
src/icmp/pinger.cc
src/ip/Address.cc
src/ip/NfMarkConfig.cc
src/ip/QosConfig.cc
src/ip/tools.cc
src/ipc/FdNotes.cc
src/ipc/MemMap.h
src/ipc/Queue.cc
src/ipc/Queue.h
src/ipc/RequestId.cc
src/ipc/StrandCoord.cc
src/ipc/mem/PageStack.cc
src/ipc/mem/Segment.cc
src/ipcache.cc
src/log/Config.cc
src/log/File.cc
src/log/FormattedLog.cc
src/log/ModSyslog.cc
src/main.cc
src/mgr/IntParam.cc
src/mime.cc
src/mime_header.cc
src/multicast.cc
src/neighbors.cc
src/parser/BinaryTokenizer.cc
src/parser/Tokenizer.cc
src/peer_proxy_negotiate_auth.cc
src/sbuf/MemBlob.cc
src/sbuf/SBuf.cc
src/sbuf/SBuf.h
src/security/CommunicationSecrets.cc
src/security/ErrorDetail.cc
src/security/Handshake.cc
src/security/Io.cc
src/security/PeerConnector.cc
src/security/PeerOptions.cc
src/security/Session.cc
src/servers/FtpServer.cc
src/servers/Server.cc
src/snmp/Var.cc
src/ssl/ErrorDetailManager.cc
src/ssl/bio.cc
src/store.cc
src/store/Disks.cc
src/store/LocalSearch.cc
src/store_digest.cc
src/store_log.cc
src/store_rebuild.cc
src/tests/stub_cache_manager.cc
src/tests/stub_debug.cc
src/tests/testHttp1Parser.cc
src/tests/testURL.cc
src/tunnel.cc
test-suite/Makefile.am
test-suite/debug.cc [deleted file]
test-suite/test_tools.cc

index a4bcf4924d68f88864fea1355efa59173a681474..dda2102a3f62b89d73c52100c63cafb7bd1ef5e2 100644 (file)
@@ -3688,6 +3688,7 @@ AC_CONFIG_FILES([
        src/base/Makefile
        src/clients/Makefile
        src/comm/Makefile
+       src/debug/Makefile
        src/dns/Makefile
        src/DiskIO/Makefile
        src/DiskIO/AIO/Makefile
index 7ec716ba14f5cf81f3764b0e24d07d1d0d386790..6f96da599e59ea543b885aeb7b3bfa9fb7656acf 100644 (file)
@@ -10,7 +10,7 @@
 #define SQUID_INCLUDE_UNITTESTMAIN_H
 
 #if ENABLE_DEBUG_SECTION
-#include "Debug.h"
+#include "debug/Stream.h"
 #endif /* ENABLE_DEBUG_SECTION */
 
 #include <cppunit/BriefTestProgressListener.h>
index f0a499d5aa5dc72adb494b7ced2d743f003bd6b2..1048c3a7bca1f8854ea112524ad94bfd80e2c789 100644 (file)
@@ -24,7 +24,7 @@
 #include "auth/ntlm/Scheme.h"
 #endif
 
-#include "Debug.h"
+#include "debug/Stream.h"
 
 /**
  * Initialize the authentication modules (if any)
index ba839d97725e8d7531b1538c89b65a513d067a53..48fc8da2618f8ba3a4dd74975050d2b860bcdfa5 100644 (file)
@@ -13,7 +13,7 @@
 #include "BandwidthBucket.h"
 #include "ClientInfo.h"
 #include "comm/Connection.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fde.h"
 
 BandwidthBucket::BandwidthBucket(const int speed, const int initialLevelPercent, const double sizeLimit) :
index 58ee069c78143c53e40b343b2c77b7d4ab3e4a47..bbc97ef581e6dd56a06193aa8f61a331c5c76d03 100644 (file)
@@ -12,7 +12,7 @@
 #include "base/RegexPattern.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fatal.h"
 #include "globals.h"
 #include "sbuf/Stream.h"
index 234f6c26cfa15f508b90c2d001e4855a2a8b7fbc..b44cb7180cb7f3c9e5ef761eb55ad87048d2e591 100644 (file)
@@ -13,7 +13,7 @@
 #include "CpuAffinity.h"
 #include "CpuAffinityMap.h"
 #include "CpuAffinitySet.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "SquidConfig.h"
 #include "tools.h"
index 757c6c02f411cfb36ff122166729931931a7535e..7e24f64b2eae6e680bcea06fefc7468d15c58b63 100644 (file)
@@ -12,7 +12,7 @@
 #include "base/TextException.h"
 #include "CpuAffinityMap.h"
 #include "CpuAffinitySet.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 bool
 CpuAffinityMap::add(const std::vector<int> &aProcesses, const std::vector<int> &aCores)
index 2d74d012b8b4cbae410e7badd861af40f9e754df..7b7c0c4126eaaac92a503dead87736a26d702da1 100644 (file)
@@ -11,7 +11,7 @@
 #include "squid.h"
 #include "base/TextException.h"
 #include "CpuAffinitySet.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "util.h"
 
 #include <cerrno>
index c2454bcc476d9a54438963b68b6064ba8aa6ce37..a3e630fb9ab0500ae177fa13c9f68867eff42757 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "DiskIO/AIO/AIODiskFile.h"
 #include "DiskIO/AIO/AIODiskIOStrategy.h"
 #include "DiskIO/IORequestor.h"
index 839cdde82c1a7ee3ecee6d1a00d1e7bd48fb262a..70ef1c2b27b0a273216b61629891ddc69e785b9b 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "BlockingFile.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "defines.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/ReadRequest.h"
index 2f29eeba6918dc1aee0fa1c46be91b3c3f3cb763..76fe331f0566286529abf4420520d76c688d413a 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 47    Store Directory Routines */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "DiskIO/IORequestor.h"
 #include "DiskIO/Mmapped/MmappedFile.h"
 #include "DiskIO/ReadRequest.h"
index 012387fb8ed5c321fabde1c8c7ff8b74174aed3a..b7f8553e6b0d9c41d7badac9becee1831209cd57 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "squid.h"
+#include "base/Raw.h"
 #include "client_side.h"
 #include "client_side_reply.h"
 #include "client_side_request.h"
index 1f0e1bc3bbbd58e06d906431c4db0e05f6d1d7b6..967726d1295c8c8f0f24fae95d8b618aa004c16e 100644 (file)
@@ -11,7 +11,7 @@
 #include "squid.h"
 #include "AsyncEngine.h"
 #include "base/AsyncCallQueue.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "EventLoop.h"
 #include "fatal.h"
 #include "SquidTime.h"
index a4ed353b346a51736ea1b7a7936f7da5339e2192..687ef82c015b22beed3906e65e9ce59a3f6cf4a7 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "FadingCounter.h"
 #include "SquidTime.h"
 
index 8cd41518b4978b09a007d4ccf34d8364fd404dd3..32addf4ff2c5070fb5f6b4203ac48edb0883aade 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "base/Packable.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "enums.h"
 #include "HttpHdrContRange.h"
 #include "HttpHeaderTools.h"
index 4415f886e271ec503611d7ddd8cbe214e018a9f4..318af12069d408fab0dd12f9d1414c729e68d78d 100644 (file)
@@ -11,6 +11,7 @@
 #include "squid.h"
 #include "base/CharacterSet.h"
 #include "base/EnumIterator.h"
+#include "base/Raw.h"
 #include "base64.h"
 #include "globals.h"
 #include "http/ContentLengthInterpreter.h"
index 83990ab5833332e49a675dffbd90b4489c8e2daf..462cbbc245488833041fce6db5f91a5afb80216b 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/File.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "fs_io.h"
 #include "Instance.h"
 #include "parser/Tokenizer.h"
index a2cd053bfdb258fb91d36d6c45c398e285a7b57e..8da1528b59ab5126be6d42cd3ba60af0978dd400 100644 (file)
@@ -7,8 +7,8 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
+#include "debug/Stream.h"
 #include "LoadableModule.h"
 #include "LoadableModules.h"
 #include "wordlist.h"
index 29ed70e482a8fc731b74e386dcdbd3a44c6c4812..be4c393469e6c0a8594a950229e3abe022802f64 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "LogTags.h"
 
 void
index 26dc260d94583495979007d4ee98087d06e74b93..3507c8489d8d1ab49650cbc861e2da21ffca4e7b 100644 (file)
@@ -31,8 +31,8 @@ LOADABLE_MODULES_SOURCES = \
        LoadableModules.cc \
        LoadableModules.h
 
-SUBDIRS = mem base anyp helper dns ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp
-DIST_SUBDIRS = mem base anyp helper dns ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp
+SUBDIRS = mem debug base anyp helper dns ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp
+DIST_SUBDIRS = mem debug base anyp helper dns ftp parser comm error eui acl format clients sbuf servers fs repl store DiskIO proxyp
 
 if ENABLE_AUTH
 SUBDIRS += auth
@@ -242,8 +242,6 @@ squid_SOURCES = \
        CpuAffinityMap.h \
        CpuAffinitySet.cc \
        CpuAffinitySet.h \
-       Debug.h \
-       DebugMessages.h \
        Downloader.cc \
        Downloader.h \
        ETag.cc \
@@ -372,7 +370,6 @@ squid_SOURCES = \
        client_side_reply.h \
        client_side_request.cc \
        client_side_request.h \
-       debug.cc \
        defines.h \
        dlink.cc \
        dlink.h \
@@ -543,6 +540,7 @@ squid_LDADD = \
        log/liblog.la \
        format/libformat.la \
        sbuf/libsbuf.la \
+       debug/libdebug.la \
        $(XTRA_OBJS) \
        $(REPL_OBJS) \
        $(NETTLELIB) \
@@ -614,7 +612,6 @@ ufsdump_SOURCES = \
        String.cc \
        cbdata.cc \
        cbdata.h \
-       debug.cc \
        dlink.cc \
        dlink.h \
        tests/stub_fd.cc \
@@ -639,6 +636,7 @@ ufsdump_LDADD = \
        fs/libfs.la \
        ipc/libipc.la \
        mgr/libmgr.la \
+       debug/libdebug.la \
        $(XTRA_OBJS) \
        $(REPL_OBJS) \
        $(NETTLELIB) \
@@ -1935,7 +1933,6 @@ tests_test_http_range_SOURCES = \
        client_side.h \
        client_side_reply.cc \
        client_side_request.cc \
-       debug.cc \
        dlink.cc \
        dlink.h \
        errorpage.cc \
@@ -2059,6 +2056,7 @@ tests_test_http_range_LDADD = \
        base/libbase.la \
        mgr/libmgr.la \
        sbuf/libsbuf.la \
+       debug/libdebug.la \
        store/libstore.la \
        $(SNMP_LIBS) \
        $(top_builddir)/lib/libmisccontainers.la \
@@ -2076,7 +2074,6 @@ tests_test_http_range_LDFLAGS = $(LIBADD_DL)
 
 check_PROGRAMS += tests/testHttp1Parser
 tests_testHttp1Parser_SOURCES = \
-       Debug.h \
        tests/stub_HelperChildConfig.cc \
        tests/testHttp1Parser.cc \
        tests/testHttp1Parser.h \
@@ -2329,7 +2326,6 @@ tests_testHttpRequest_SOURCES = \
        client_side.h \
        client_side_reply.cc \
        client_side_request.cc \
-       debug.cc \
        dlink.cc \
        dlink.h \
        errorpage.cc \
@@ -2452,6 +2448,7 @@ tests_testHttpRequest_LDADD = \
        format/libformat.la \
        store/libstore.la \
        sbuf/libsbuf.la \
+       debug/libdebug.la \
        $(REPL_OBJS) \
        $(ADAPTATION_LIBS) \
        $(ESI_LIBS) \
@@ -2636,7 +2633,6 @@ tests_testCacheManager_SOURCES = \
        client_side.h \
        client_side_reply.cc \
        client_side_request.cc \
-       debug.cc \
        dlink.cc \
        dlink.h \
        errorpage.cc \
@@ -2763,6 +2759,7 @@ tests_testCacheManager_LDADD = \
        mem/libmem.la \
        store/libstore.la \
        sbuf/libsbuf.la \
+       debug/libdebug.la \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
index 89396f40ef8d0766df884d1e59fcd9a3c2a382c7..8d5dd9c1ac2cba3b176ac359c5726014de0a1795 100644 (file)
@@ -12,7 +12,7 @@
 #include "cache_cf.h"
 #include "compat/strtoll.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "Parsing.h"
 #include "sbuf/Stream.h"
index 69970ff7b5245a8b7f7b262f11fd4952eba94b56..252a259dd2cac047a4a897bca77ebf7336cbcaed 100644 (file)
@@ -13,7 +13,7 @@
 #include "CachePeer.h"
 #include "comm/Connection.h"
 #include "comm/ConnOpener.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fd.h"
 #include "FwdState.h"
 #include "globals.h"
index a557ff3114fa54419da472af437ecaf2353183dd..8f7757df0301ed513491f829cb18a10ed70eb8a7 100644 (file)
@@ -12,7 +12,7 @@
 #include "squid.h"
 #include "anyp/PortCfg.h"
 #include "client_side.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/Stream.h"
 #include "Pipeline.h"
 
index e36cd27295d8743c6d3e50cb9bd889030f6d0ff7..3637e13a7c00c277e1d626681150a3aefb93bc4b 100644 (file)
@@ -12,7 +12,7 @@
 #define SQUID_STRING_H
 
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 #include <ostream>
 
index 93f3facf73b25d24fbdd1d6cf2b391069c51de40..c8f6bbab4c4ef92fbe43ac781a3575027e116d73 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 20    Swap Dir base object */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "defines.h"
 #include "Store.h"
 #include "StoreIOState.h"
index 4d4ac3f8aebd15e86560bdb3d1e902b3945ba40a..d26d376c0c1b8c2a035df61b8239c7c4d74d49ba 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "defines.h"
 #include "StoreMeta.h"
 #include "StoreMetaUnpacker.h"
index bf937d6d64003ad9d3b9d50fb27aec30c9c89d80..cfa81e7827e481a918eb04e0a9ae1f230052c8bc 100644 (file)
@@ -9,7 +9,7 @@
 /* Inspired by previous work by Romeo Anghelache & Eric Stern. */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "protos.h"
 #include "SquidConfig.h"
index 1805052a99785a83f3db2c67b84d310c75f1f759..f46a27ef68ae9d474c953387a514c30fead6b330 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "cache_cf.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "XactionInitiator.h"
 
 #include <map>
index a70419a62f8e71d123da02912ccb1761c1f2f87b..cf4fe3f0942cb622ed5f6fdfb29ab49f8c1eba9a 100644 (file)
@@ -16,7 +16,7 @@
 #include "anyp/PortCfg.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fatal.h"
 #include "globals.h"
 #include "sbuf/List.h"
index 0d58a9666c1e2c3edc6fa67b30943eb624540756..d42472d3964137448e69fd3867be49a4c028a8a9 100644 (file)
@@ -16,7 +16,7 @@
 #include "adaptation/ServiceGroups.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 void
 ACLAdaptationServiceData::parse()
index b6ca990318db0b4c299ae718a270859b81033d2e..4cec359ba111d72d1733455eced0a212eec761dc 100644 (file)
@@ -12,7 +12,7 @@
 #include "acl/Checklist.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "format/Format.h"
 #include "sbuf/Algorithms.h"
 
index 8e805d7d47e705b8e14ab14f8b92c5eacab38701..b50f7b2208ac9414a95c79f789efc007d4e16815 100644 (file)
@@ -15,7 +15,7 @@
 #include "acl/Arp.h"
 #include "acl/FilledChecklist.h"
 #include "cache_cf.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "eui/Eui48.h"
 #include "globals.h"
 #include "ip/Address.h"
index 61d839331d667579cf1bc434d1a5a809adf88628..34360a5995b3fc437bd377ee9c7546625f6f2faa 100644 (file)
@@ -12,7 +12,7 @@
 #include "base/EnumIterator.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/Stream.h"
 #include "wordlist.h"
 
index 48eab6113b0894105f9c8156fbe1aa989a919726..beea26cec1ad5027067b0efc9a16eb8b35136203 100644 (file)
@@ -9,7 +9,7 @@
 #include "squid.h"
 #include "acl/BoolOps.h"
 #include "acl/Checklist.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/SBuf.h"
 
 /* Acl::NotNode */
index 5f8744520a5b641e9e3bdf35f37000f3c66345ed..b5a55114c99e22849bb155f2e43ee908906b2588 100644 (file)
@@ -13,7 +13,7 @@
 #include "acl/Checklist.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "wordlist.h"
 
 ACLCertificateData::ACLCertificateData(Ssl::GETX509ATTRIBUTE *sslStrategy, const char *attrs, bool optionalAttr) : validAttributesStr(attrs), attributeIsOptional(optionalAttr), attribute (NULL), values (), sslAttributeCall (sslStrategy)
index c4a7fc27477ae5d9d3a72d2cea03492a3835ef38..739736d7192970815969a726a3b94ea7f09db039 100644 (file)
@@ -11,7 +11,7 @@
 #include "squid.h"
 #include "acl/Checklist.h"
 #include "acl/Tree.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 #include <algorithm>
 
index 1478ee7f9c51d81cb900946c18008330604bf914..e99699b93087e29469ec2747e49d198a09ebb8ad 100644 (file)
@@ -11,8 +11,9 @@
 #include "squid.h"
 #include "acl/ConnMark.h"
 #include "acl/FilledChecklist.h"
+#include "base/IoManip.h"
 #include "client_side.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/Stream.h"
 #include "sbuf/Stream.h"
 
index a1b3ca746562c407466e4be57bb7f4b00afeb3c4..5df3ae4943fc5b595f38234a9557b78326ad4078 100644 (file)
@@ -11,7 +11,7 @@
 #include "squid.h"
 #include "acl/ConnectionsEncrypted.h"
 #include "acl/FilledChecklist.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "SquidConfig.h"
index d4b25130f08aaa8f73ee11678298c4cd60158d4b..90726f6e9d0055b8cbddf51d0c4e52562a6a3a5b 100644 (file)
@@ -14,7 +14,7 @@
 #include "anyp/Uri.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "util.h"
 
 template<class T>
index d2d3d3d0ec8c615e750fead324bd3dbae42ee354..ebcc22bb6d2c087ff19606aa22d5cf0d019f09cf 100644 (file)
@@ -15,7 +15,7 @@
 #include "acl/Eui64.h"
 #include "acl/FilledChecklist.h"
 #include "cache_cf.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "eui/Eui64.h"
 #include "globals.h"
 #include "ip/Address.h"
index 0df725eaf36bcf0d1be60fbd6d7c3fecf6743d18..234c7ada0067fc175771c2420493602c0ace0efe 100644 (file)
@@ -11,7 +11,7 @@
 #include "client_side.h"
 #include "comm/Connection.h"
 #include "comm/forward.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "ExternalACLEntry.h"
 #include "http/Stream.h"
 #include "HttpReply.h"
index 891173e893800fceca6823c4b2847bc873a3bb75..03b1965d7b729b02cec5e5e9ed9db41d25fc2c1b 100644 (file)
@@ -16,7 +16,7 @@
 #include "base/RegexPattern.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "HttpHeaderTools.h"
 #include "sbuf/SBuf.h"
 #include "sbuf/StringConvert.h"
index 452fd9d3d3359a9f4b7e6c2d61e7cb8a86ff08e8..af4ff3bccb37442281df6d093d5d83ea615995bd 100644 (file)
@@ -11,7 +11,7 @@
 #include "squid.h"
 #include "acl/FilledChecklist.h"
 #include "acl/HttpStatus.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "HttpReply.h"
 
 #include <climits>
index 9924db74b7b0d7c0753ab0aed5713690ffbdc69b..96352f2ce648da62819ac3cfdbb649b6a6e9a6bb 100644 (file)
@@ -14,7 +14,7 @@
 #include "acl/InnerNode.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include <algorithm>
 
index ad0849e2a4c17cae610e3ca918200db4f7a48ebe..819e8fcc0d87e8077e7eb1bacc4fabdf113217a8 100644 (file)
@@ -12,7 +12,7 @@
 #include "acl/IntRange.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fatal.h"
 #include "Parsing.h"
 
index a1193140e2248c5b8e7af05d1cd15c33b557f0c8..be48ffa6ac7d9acff5c421c496f835c6cd4c1c9c 100644 (file)
@@ -13,7 +13,7 @@
 #include "acl/Ip.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ip/tools.h"
 #include "MemBuf.h"
 #include "wordlist.h"
index f57e4eb5a10b9c9d91cd5e43046d7b4186d552f4..891a096f1657021d8b404ad81f2fee9a51629468 100644 (file)
@@ -12,7 +12,7 @@
 #include "acl/FilledChecklist.h"
 #include "acl/MaxConnection.h"
 #include "client_db.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "SquidConfig.h"
 
 ACLMaxConnection::ACLMaxConnection (char const *theClass) : class_ (theClass), limit(-1)
index df8dfc0819c3e69a72fbed96bf8e4e5721212a1a..7e2f6cb55ad000096ca98c73f470f2e07c6f0357 100644 (file)
@@ -12,7 +12,7 @@
 #include "acl/NoteData.h"
 #include "acl/StringData.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/StringConvert.h"
 #include "wordlist.h"
 
index b06157162631d14d71ff8599e9fa5deb4439acbb..0650e0da0e8fdcde8814c5cfe63044f59507f671 100644 (file)
@@ -9,7 +9,7 @@
 #include "squid.h"
 #include "acl/Options.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/Stream.h"
 
 #include <iostream>
index c1b8fec64c10b633276fa32bf468ce765f55045c..12ba9c9819667a23ffaa7ebda69b86fe3db950d4 100644 (file)
@@ -12,7 +12,7 @@
 #include "acl/Checklist.h"
 #include "acl/ProtocolData.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "wordlist.h"
 
 ACLProtocolData::~ACLProtocolData()
index 5a406e42efbaaeb400e59b2f363d919bf07bc060..1cf942fd90e944a685b89f8cc4d628bfa1ff2991 100644 (file)
@@ -11,7 +11,7 @@
 #include "squid.h"
 #include "acl/FilledChecklist.h"
 #include "acl/Random.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "Parsing.h"
 #include "wordlist.h"
 
index 3978df489e3f3d027c4e8c2dc8e79b9d4f82c81e..f4e68926a056951c0cacd23254ecfc1c0ac70888 100644 (file)
@@ -21,7 +21,7 @@
 #include "base/RegexPattern.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/Algorithms.h"
 #include "sbuf/List.h"
 #include "sbuf/Stream.h"
index f74bdf6bb6d96e568d5d889c9f74c0b026147e6c..aad79c4ea0e7a19414d5f12930a945398d046712 100644 (file)
@@ -11,7 +11,7 @@
 #include "acl/SquidErrorData.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "error/Error.h"
 #include "fatal.h"
 #include "wordlist.h"
index ae50a8aec3ca0d382aa86407037163bec69a5910..98521ab055a3dcfed792053ac15a46f1a6087b29 100644 (file)
@@ -12,7 +12,7 @@
 #include "acl/Checklist.h"
 #include "acl/StringData.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 void
 ACLStringData::insert(const char *value)
index a1637c7d44c5e73d50e04bf804d59b1df7b56da4..b259669da0c84037f24ce13606ffdca10f2f9886 100644 (file)
@@ -13,7 +13,7 @@
 #include "acl/TimeData.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "wordlist.h"
 
 #define ACL_SUNDAY  0x01
index f6cf160315feb93f6e2e1931f230ca333a40d17d..da95bb3004d23b94709621e08ca38287bbb5c752 100644 (file)
@@ -12,7 +12,7 @@
 #include "acl/FilledChecklist.h"
 #include "acl/TransactionInitiator.h"
 #include "cache_cf.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "HttpRequest.h"
 #include "MasterXaction.h"
 #include "SquidConfig.h"
index c81474dda6dd7c3cbb52de485676b7abab51c0b0..2a6fc682aed7a582cd76b51e3b326e988c37364b 100644 (file)
@@ -13,7 +13,7 @@
 #include "acl/Options.h"
 #include "acl/UserData.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "sbuf/Algorithms.h"
 #include "util.h"
index 6a8fb8a487f370ce96ee397838c8e099add1d454..4c19b056c92d4d11073d67c412a432ba633bf702 100644 (file)
@@ -13,7 +13,7 @@
 #include "adaptation/Service.h"
 #include "adaptation/ServiceGroups.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 int Adaptation::AccessRule::LastId = 0;
 
index 114189ec8171dcabe10c4e9c84317b612ce7c36b..e179f382a4c84dbd0e025ba951fc7312229a7c27 100644 (file)
@@ -16,7 +16,7 @@
 #include "adaptation/ServiceGroups.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "globals.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
index 228faddfbe40ae04b69f2383a3794158585b0655..1381cf4a1333a179f1e3c0dc06684536c23b5b49 100644 (file)
@@ -10,7 +10,7 @@
 #include "adaptation/Config.h"
 #include "adaptation/History.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "SquidTime.h"
 
index 30e09e24d9d8505d4dc7fc14395c3837811f6f84..ecb6b4e43424ca3da82b540fc72546767e68e933 100644 (file)
@@ -12,7 +12,7 @@
 #include "adaptation/ServiceConfig.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "ip/tools.h"
 #include <set>
index 42ad096898a4b5f19dbeb8133f6a1c62958d4c59..d92a3a8dec37cdea810598c2150c8d27ea9514ff 100644 (file)
@@ -14,7 +14,7 @@
 #include "adaptation/ServiceFilter.h"
 #include "adaptation/ServiceGroups.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "StrList.h"
 #include "wordlist.h"
 
index c20ab896fefaf3f0f0479a67971c1c6da722bc55..2ae32c3af01371c0e247ff44a377d1d0a8e12018 100644 (file)
@@ -15,7 +15,7 @@
 #include "adaptation/ecap/XactionRep.h"
 #include "AsyncEngine.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "EventLoop.h"
 
 #include <libecap/adapter/service.h>
index 8b4684ce6439519f632aed1d49856e938822b7bb..521773c23d4d491bf942233a8122f5e35d6793e1 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "adaptation/icap/Client.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 void Adaptation::Icap::InitModule()
 {
index a88bccb0e0626a30f6e7c45d0cc8a6753bf3487e..f70275fd0b97ee26a7743932db7dad1275cadb3c 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "adaptation/icap/History.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "SquidTime.h"
 
index 967e6cd768e1805011413323ef5513bb0c523849..8ef224dc11d08450714ec217ad67d71f02b5ef1f 100644 (file)
@@ -18,7 +18,7 @@
 #include "base/TextException.h"
 #include "comm/Connection.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fde.h"
 #include "globals.h"
 #include "HttpReply.h"
index aa6b9011e1057d8eec516b1d1ace80f0f930bbac..2c50065fb5934e8b1d04e255ff0a7a9b346828ec 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "squid.h"
 #include "anyp/Uri.h"
+#include "base/Raw.h"
 #include "globals.h"
 #include "HttpRequest.h"
 #include "parser/Tokenizer.h"
index f2fab8f7866ecf472578ed36573dde9a1533c05e..f62da10586dcf15b8a2cf8d4decfe6943d4d026d 100644 (file)
@@ -14,7 +14,7 @@
 #include "auth/AclMaxUserIp.h"
 #include "auth/UserRequest.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "Parsing.h"
 #include "wordlist.h"
 
index 97efa09c522877a2f98e2563bd6f60cd381e6c17..f16f7c84cd66d59e4168dfdbde188a2709fea1c7 100644 (file)
@@ -13,7 +13,7 @@
 #include "auth/Config.h"
 #include "auth/CredentialsCache.h"
 #include "base/RunnersRegistry.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "event.h"
 
 namespace Auth {
index 6f1924fc39ba1d075db2543c703b96ee39ce5d4c..ac246a34ceaa662460a51e59115f03d1dd1f12f9 100644 (file)
@@ -15,7 +15,7 @@
 #include "auth/UserRequest.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "errorpage.h"
 #include "format/Format.h"
 #include "globals.h"
index 47cde30a856560e70f0ef9574404c5f620bbab71..4c7eb0216b7354ef80a87fcd3cfc34834c0757e5 100644 (file)
@@ -9,8 +9,8 @@
 #include "squid.h"
 #include "auth/basic/Config.h"
 #include "auth/basic/Scheme.h"
-#include "Debug.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
+#include "debug/Stream.h"
 #include "helper.h"
 
 Auth::Scheme::Pointer Auth::Basic::Scheme::_instance = NULL;
index 73d0280b46b021b40f3677b66205ab9c25bc6f46..f5b58d94504d39dabe1751a84d1065deb594bf7a 100644 (file)
@@ -11,7 +11,7 @@
 #include "auth/basic/User.h"
 #include "auth/Config.h"
 #include "auth/CredentialsCache.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 Auth::Basic::User::User(Auth::SchemeConfig *aConfig, const char *aRequestRealm) :
     Auth::User(aConfig, aRequestRealm),
index d2086196000196c6025951965ccb8e3ae8703e06..a384a3faf64c718e5f6a126e66ffd06f4bf811d6 100644 (file)
@@ -12,7 +12,7 @@
 #include "auth/basic/UserRequest.h"
 #include "auth/QueueNode.h"
 #include "auth/State.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "format/Format.h"
 #include "helper.h"
 #include "helper/Reply.h"
index ad303d4a718a78a072dabf6141915ae54d89999a..47cf89e1694a0391f1e47eb638e3f479b833b6a3 100644 (file)
@@ -9,8 +9,8 @@
 #include "squid.h"
 #include "auth/digest/Config.h"
 #include "auth/digest/Scheme.h"
-#include "Debug.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "helper.h"
 
index a0b915724206588d92a1005cfa68de316073ea6a..fe81674c6b41191fb717f36784bf330427abdf93 100644 (file)
@@ -11,7 +11,7 @@
 #include "auth/CredentialsCache.h"
 #include "auth/digest/Config.h"
 #include "auth/digest/User.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "dlink.h"
 
 Auth::Digest::User::User(Auth::SchemeConfig *aConfig, const char *aRequestRealm) :
index d84c58bc08504747839579bdc014d8ca1dc44400..dbad33065db453376f4e5c27a3f28472684b95e7 100644 (file)
@@ -9,8 +9,8 @@
 #include "squid.h"
 #include "auth/negotiate/Config.h"
 #include "auth/negotiate/Scheme.h"
-#include "Debug.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
+#include "debug/Stream.h"
 #include "helper.h"
 
 Auth::Scheme::Pointer Auth::Negotiate::Scheme::_instance = NULL;
index f4da71dc532d23591a114a2dcfdc76a60f555a39..b29796acc243eb35b4496b05d4b1aca105780624 100644 (file)
@@ -10,7 +10,7 @@
 #include "auth/CredentialsCache.h"
 #include "auth/negotiate/User.h"
 #include "auth/SchemeConfig.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 Auth::Negotiate::User::User(Auth::SchemeConfig *aConfig, const char *aRequestRealm) :
     Auth::User(aConfig, aRequestRealm)
index ad5f93185988343829ce6608f6b0fe2e27fba81f..5fac5e1d772b32ab6cace8c7cd6bf0b965942d7e 100644 (file)
@@ -9,8 +9,8 @@
 #include "squid.h"
 #include "auth/ntlm/Config.h"
 #include "auth/ntlm/Scheme.h"
-#include "Debug.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
+#include "debug/Stream.h"
 #include "helper.h"
 
 Auth::Scheme::Pointer Auth::Ntlm::Scheme::_instance = NULL;
index 25db6a8f9352490faa171292d68df9e299f7aeb2..4b635767804f6f82c037c3bbe1c9bf4722ede28c 100644 (file)
@@ -10,7 +10,7 @@
 #include "auth/CredentialsCache.h"
 #include "auth/ntlm/User.h"
 #include "auth/SchemeConfig.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 Auth::Ntlm::User::User(Auth::SchemeConfig *aConfig, const char *aRequestRealm) :
     Auth::User(aConfig, aRequestRealm)
index 41752080f73151119fdd4111bc61bad9736eea7c..2818743dc4869459f3bc9f8bfd38df3d15702c8b 100644 (file)
@@ -11,7 +11,7 @@
 #include "base/AsyncCallQueue.h"
 #include "base/CodeContext.h"
 #include "cbdata.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include <ostream>
 
 InstanceIdDefinitions(AsyncCall, "call");
index ef6dca425fe609b9e7ca64676219c5790e2fe546..fdfb2d8473b91ca4cabb59565661bc6376b382cd 100644 (file)
@@ -11,7 +11,7 @@
 #include "squid.h"
 #include "base/AsyncCall.h"
 #include "base/AsyncCallQueue.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 AsyncCallQueue *AsyncCallQueue::TheInstance = 0;
 
index 70fd731ddcc72557904e40b053fa83a695fceb8f..9af31272bf19302d562bb46cea8f046cb52c03b0 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "base/AsyncJob.h"
 #include "base/CbcPointer.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 /**
  \ingroup AsyncJobAPI
index fd4f2e8f7c2b1f952f097377c87e7923dca7fa85..3b6b4408b92f8a59dcceb20827e8fe4dee148092 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "base/TextException.h"
 #include "cbdata.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 /**
  \ingroup CBDATAAPI
index 68205c002377800d4f7dbdf0ec033bc24edacac3..0f885391ba679f0445d27a5f8f84992e41a322f9 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/CodeContext.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 /// represents a being-forgotten CodeContext (while it may be being destroyed)
 class FadingCodeContext: public CodeContext
index c2c7ec574ba768ed0d428fe2abfcff32f1abb2a2..aaff8191827a894adae3b7ebd63df65f898395a6 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/File.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/Stream.h"
 #include "tools.h"
 #include "xusleep.h"
diff --git a/src/base/IoManip.cc b/src/base/IoManip.cc
new file mode 100644 (file)
index 0000000..2cfce0f
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#include "squid.h"
+#include "base/IoManip.h"
+#include "debug/Stream.h"
+
+#include <algorithm>
+
+void
+PrintHex(std::ostream &os, const char * const data, const size_t n)
+{
+    if (!n)
+        return;
+    assert(data);
+
+    const auto savedFill = os.fill('0');
+    const auto savedFlags = os.flags(); // std::ios_base::fmtflags
+    os << std::hex;
+    std::for_each(data, data + n,
+    [&os](const char &c) { os << std::setw(2) << static_cast<uint8_t>(c); });
+    os.flags(savedFlags);
+    os.fill(savedFill);
+}
+
diff --git a/src/base/IoManip.h b/src/base/IoManip.h
new file mode 100644 (file)
index 0000000..7f14953
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#ifndef SQUID_SRC_BASE_IO_MANIP_H
+#define SQUID_SRC_BASE_IO_MANIP_H
+
+#include <iostream>
+#include <iomanip>
+
+/// debugs objects pointed by possibly nil pointers: label=object
+template <class Pointer>
+class RawPointerT {
+public:
+    RawPointerT(const char *aLabel, const Pointer &aPtr):
+        label(aLabel), ptr(aPtr) {}
+    const char *label; /// the name or description of the being-debugged object
+    const Pointer &ptr; /// a possibly nil pointer to the being-debugged object
+};
+
+/// convenience wrapper for creating  RawPointerT<> objects
+template <class Pointer>
+inline RawPointerT<Pointer>
+RawPointer(const char *label, const Pointer &ptr)
+{
+    return RawPointerT<Pointer>(label, ptr);
+}
+
+/// prints RawPointerT<>, dereferencing the io_manip pointer if possible
+template <class Pointer>
+inline std::ostream &
+operator <<(std::ostream &os, const RawPointerT<Pointer> &pd)
+{
+    os << pd.label << '=';
+    if (pd.ptr)
+        os << *pd.ptr;
+    else
+        os << "[nil]";
+    return os;
+}
+
+/// std::ostream manipulator to print integers as hex numbers prefixed by 0x
+template <class Integer>
+class AsHex
+{
+public:
+    explicit AsHex(const Integer n): io_manip(n) {}
+    Integer io_manip; ///< the integer to print
+};
+
+template <class Integer>
+inline std::ostream &
+operator <<(std::ostream &os, const AsHex<Integer> number)
+{
+    const auto oldFlags = os.flags();
+    os << std::hex << std::showbase << number.io_manip;
+    os.setf(oldFlags);
+    return os;
+}
+
+/// a helper to ease AsHex object creation
+template <class Integer>
+inline AsHex<Integer> asHex(const Integer n) { return AsHex<Integer>(n); }
+
+/// Prints the first n data bytes using hex notation. Does nothing if n is 0.
+void PrintHex(std::ostream &, const char *data, size_t n);
+
+#endif /* SQUID_SRC_BASE_IO_MANIP_H */
+
index b8476c18e1a705430919f40dffd7876deb42002a..3dd32c134153fa7ad0fce674c7f480647cceb98f 100644 (file)
@@ -35,6 +35,8 @@ libbase_la_SOURCES = \
        Here.h \
        InstanceId.cc \
        InstanceId.h \
+       IoManip.cc \
+       IoManip.h \
        JobWait.cc \
        JobWait.h \
        Lock.h \
@@ -43,6 +45,8 @@ libbase_la_SOURCES = \
        Packable.h \
        PackableStream.h \
        Range.h \
+       Raw.cc \
+       Raw.h \
        RefCount.h \
        RegexPattern.cc \
        RegexPattern.h \
diff --git a/src/base/Raw.cc b/src/base/Raw.cc
new file mode 100644 (file)
index 0000000..a1f4fc4
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+#include "squid.h"
+#include "base/IoManip.h"
+#include "base/Raw.h"
+#include "debug/Stream.h"
+
+#include <iostream>
+
+std::ostream &
+Raw::print(std::ostream &os) const
+{
+    if (label_)
+        os << ' ' << label_ << '[' << size_ << ']';
+
+    if (!size_)
+        return os;
+
+    // finalize debugging level if no level was set explicitly via minLevel()
+    const int finalLevel = (level >= 0) ? level :
+                           (size_ > 40 ? DBG_DATA : Debug::SectionLevel());
+    if (finalLevel <= Debug::SectionLevel()) {
+        if (label_)
+            os << '=';
+        else if (useGap_)
+            os << ' ';
+        if (data_) {
+            if (useHex_)
+                PrintHex(os, data_, size_);
+            else
+                os.write(data_, size_);
+        } else {
+            os << "[null]";
+        }
+    }
+
+    return os;
+}
+
diff --git a/src/base/Raw.h b/src/base/Raw.h
new file mode 100644 (file)
index 0000000..8638ddf
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
+/* DEBUG: section 00    Debug Routines */
+
+#ifndef SQUID_SRC_BASE_RAW_H
+#define SQUID_SRC_BASE_RAW_H
+
+#include <iosfwd>
+
+/// Prints raw and/or non-terminated data safely, efficiently, and beautifully.
+/// Allows raw data debugging in debugs() statements with low debugging levels
+/// by printing only if higher section debugging levels are configured:
+///   debugs(11, DBG_IMPORTANT, "always printed" << Raw(may be printed...));
+class Raw
+{
+public:
+    Raw(const char *label, const char *data, const size_t size):
+        level(-1), label_(label), data_(data), size_(size), useHex_(false), useGap_(true) {}
+
+    /// limit data printing to at least the given debugging level
+    Raw &minLevel(const int aLevel) { level = aLevel; return *this; }
+
+    /// print data using two hex digits per byte (decoder: xxd -r -p)
+    Raw &hex() { useHex_ = true; return *this; }
+
+    Raw &gap(bool useGap = true) { useGap_ = useGap; return *this; }
+
+    /// If debugging is prohibited by the current debugs() or section level,
+    /// prints nothing. Otherwise, dumps data using one of these formats:
+    ///   " label[size]=data" if label was set and data size is positive
+    ///   " label[0]" if label was set and data size is zero
+    ///   " data" if label was not set and data size is positive
+    ///   "" (i.e., prints nothing) if label was not set and data size is zero
+    std::ostream &print(std::ostream &os) const;
+
+    /// Minimum section debugging level necessary for printing. By default,
+    /// small strings are always printed while large strings are only printed
+    /// if DBG_DATA debugging level is enabled.
+    int level;
+
+private:
+    void printHex(std::ostream &os) const;
+
+    const char *label_; ///< optional data name or ID; triggers size printing
+    const char *data_; ///< raw data to be printed
+    size_t size_; ///< data length
+    bool useHex_; ///< whether hex() has been called
+    bool useGap_; ///< whether to print leading space if label is missing
+};
+
+inline std::ostream &
+operator <<(std::ostream &os, const Raw &raw)
+{
+    raw.print(os);
+    return os;
+}
+
+#endif /* SQUID_SRC_BASE_RAW_H */
+
index 7a6b8037f259d49a7da245dcc6c762658aeeb467..7cdfa91af9d63ffbe1f1815e83c7926145dc339e 100644 (file)
@@ -9,7 +9,7 @@
 #include "squid.h"
 #include "base/RegexPattern.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/Stream.h"
 
 #include <iostream>
index f7a86be5ce630c3ec82f57568d6802e013c3f073..2fa3e863a693d5eb46bb80c196022548314668d3 100644 (file)
@@ -9,7 +9,7 @@
 #include "squid.h"
 #include "base/RunnersRegistry.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include <set>
 
 /// a collection of unique runners, in no particular order
index 5fb02ab6763c11947a6033bfeb58dbbcfc670704..995b2ac934dac5a4908198744efbdedc00c275a4 100644 (file)
@@ -10,7 +10,7 @@
 #define SQUID_YESNONONE_H_
 
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 // TODO: generalize / template to non-boolean option types
 // and make YesNoNone the boolean instance of the template
index 7a91102724d15bfd41fd5bb23d97c1efc474ae69..45354740492544f5d50f3b56fffce1d14d6172cb 100644 (file)
@@ -15,6 +15,7 @@ class CallDialer;
 class CodeContext;
 class ScopedId;
 class BadOptionalAccess;
+class Raw;
 class RegexPattern;
 
 template <typename Value> class Optional;
index dfc2d82f187db064a167bc7d33be6b9c18618a0a..fca5d8140e72ddd029493a03c6197a4b40a32331 100644 (file)
@@ -28,7 +28,7 @@
 #include "ConfigOption.h"
 #include "ConfigParser.h"
 #include "CpuAffinityMap.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "DiskIO/DiskIOModule.h"
 #include "eui/Config.h"
 #include "ExternalACL.h"
index fe2fb6bbf49d7bbae3dad84191f7a985912d2507..4a2f30b191d20faedee7da59b2f79d5a2cdb7000 100644 (file)
@@ -13,7 +13,7 @@
 #include "base/TextException.h"
 #include "CacheManager.h"
 #include "comm/Connection.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "error/ExceptionErrorDetail.h"
 #include "errorpage.h"
 #include "fde.h"
index 1d770b5e7f4fe66b2e94a5557183b4600e864ee6..f6c04d16a23e98efc6e2a4e60aba4ec2027e9806 100644 (file)
@@ -76,7 +76,7 @@
 #include "comm/TcpAcceptor.h"
 #include "comm/Write.h"
 #include "CommCalls.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "error/ExceptionErrorDetail.h"
 #include "errorpage.h"
 #include "fd.h"
index a5af5a5d9bc281c3ecc1c6222513853de2ae4865..6b3f037832ff78fb4e958a3c2fa08350687d7242 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "squid.h"
+#include "base/Raw.h"
 #include "CachePeer.h"
 #include "clients/HttpTunneler.h"
 #include "comm/Read.h"
index 75e2c5bad0f2d5df515678aade15e98eaed19cf1..910ff6c54a49c9e6b7767010e66fc38702d36496 100644 (file)
@@ -15,7 +15,7 @@
 #include "comm/Read.h"
 #include "comm_internal.h"
 #include "CommCalls.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fd.h"
 #include "fde.h"
 #include "sbuf/SBuf.h"
index 9c2e3500ec1f4329aad39b04d7cac9e293e03e2c..12a8180748c0f5bb978e48cd821770a58b871de0 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "comm/Tcp.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 #if HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
diff --git a/src/debug/Makefile.am b/src/debug/Makefile.am
new file mode 100644 (file)
index 0000000..ba9ea72
--- /dev/null
@@ -0,0 +1,17 @@
+## Copyright (C) 1996-2022 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
+
+include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
+
+noinst_LTLIBRARIES = libdebug.la
+
+libdebug_la_SOURCES = \
+       debug.cc \
+       Messages.h \
+       Stream.h
+
similarity index 99%
rename from src/DebugMessages.h
rename to src/debug/Messages.h
index 914ff7ee2e49a8a19f4d7ef8601411f44331f52c..02d12ce7fd11d00efbd30e71c210dbe5e31d5803 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef SQUID_DEBUG_MESSAGES_H
 #define SQUID_DEBUG_MESSAGES_H
 
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "SquidConfig.h"
 
 #include <array>
similarity index 69%
rename from src/Debug.h
rename to src/debug/Stream.h
index 3e51c5d4636ccb3e6f5542d9c651325df390e145..fa3bffc007f838fd79966d2f3ee14def448f4981 100644 (file)
@@ -8,8 +8,8 @@
 
 /* DEBUG: section 00    Debug Routines */
 
-#ifndef SQUID_DEBUG_H
-#define SQUID_DEBUG_H
+#ifndef SQUID_SRC_DEBUG_STREAM_H
+#define SQUID_SRC_DEBUG_STREAM_H
 
 #include "base/Here.h"
 // XXX should be mem/forward.h once it removes dependencies on typedefs.h
@@ -237,108 +237,5 @@ inline std::ostream& operator <<(std::ostream &os, const uint8_t d)
 /* Legacy debug function definitions */
 void _db_rotate_log(void);
 
-/// Prints raw and/or non-terminated data safely, efficiently, and beautifully.
-/// Allows raw data debugging in debugs() statements with low debugging levels
-/// by printing only if higher section debugging levels are configured:
-///   debugs(11, DBG_IMPORTANT, "always printed" << Raw(may be printed...));
-class Raw
-{
-public:
-    Raw(const char *label, const char *data, const size_t size):
-        level(-1), label_(label), data_(data), size_(size), useHex_(false), useGap_(true) {}
-
-    /// limit data printing to at least the given debugging level
-    Raw &minLevel(const int aLevel) { level = aLevel; return *this; }
-
-    /// print data using two hex digits per byte (decoder: xxd -r -p)
-    Raw &hex() { useHex_ = true; return *this; }
-
-    Raw &gap(bool useGap = true) { useGap_ = useGap; return *this; }
-
-    /// If debugging is prohibited by the current debugs() or section level,
-    /// prints nothing. Otherwise, dumps data using one of these formats:
-    ///   " label[size]=data" if label was set and data size is positive
-    ///   " label[0]" if label was set and data size is zero
-    ///   " data" if label was not set and data size is positive
-    ///   "" (i.e., prints nothing) if label was not set and data size is zero
-    std::ostream &print(std::ostream &os) const;
-
-    /// Minimum section debugging level necessary for printing. By default,
-    /// small strings are always printed while large strings are only printed
-    /// if DBG_DATA debugging level is enabled.
-    int level;
-
-private:
-    void printHex(std::ostream &os) const;
-
-    const char *label_; ///< optional data name or ID; triggers size printing
-    const char *data_; ///< raw data to be printed
-    size_t size_; ///< data length
-    bool useHex_; ///< whether hex() has been called
-    bool useGap_; ///< whether to print leading space if label is missing
-};
-
-inline
-std::ostream &operator <<(std::ostream &os, const Raw &raw)
-{
-    return raw.print(os);
-}
-
-/// debugs objects pointed by possibly nil pointers: label=object
-template <class Pointer>
-class RawPointerT {
-public:
-    RawPointerT(const char *aLabel, const Pointer &aPtr):
-        label(aLabel), ptr(aPtr) {}
-    const char *label; /// the name or description of the being-debugged object
-    const Pointer &ptr; /// a possibly nil pointer to the being-debugged object
-};
-
-/// convenience wrapper for creating  RawPointerT<> objects
-template <class Pointer>
-inline RawPointerT<Pointer>
-RawPointer(const char *label, const Pointer &ptr)
-{
-    return RawPointerT<Pointer>(label, ptr);
-}
-
-/// prints RawPointerT<>, dereferencing the raw pointer if possible
-template <class Pointer>
-inline std::ostream &
-operator <<(std::ostream &os, const RawPointerT<Pointer> &pd)
-{
-    os << pd.label << '=';
-    if (pd.ptr)
-        return os << *pd.ptr;
-    else
-        return os << "[nil]";
-}
-
-/// std::ostream manipulator to print integers as hex numbers prefixed by 0x
-template <class Integer>
-class AsHex
-{
-public:
-    explicit AsHex(const Integer n): raw(n) {}
-    Integer raw; ///< the integer to print
-};
-
-template <class Integer>
-inline std::ostream &
-operator <<(std::ostream &os, const AsHex<Integer> number)
-{
-    const auto oldFlags = os.flags();
-    os << std::hex << std::showbase << number.raw;
-    os.setf(oldFlags);
-    return os;
-}
-
-/// a helper to ease AsHex object creation
-template <class Integer>
-inline AsHex<Integer> asHex(const Integer n) { return AsHex<Integer>(n); }
-
-/// Prints the first n data bytes using hex notation. Does nothing if n is 0.
-void PrintHex(std::ostream &, const char *data, size_t n);
-
-#endif /* SQUID_DEBUG_H */
+#endif /* SQUID_SRC_DEBUG_STREAM_H */
 
similarity index 96%
rename from src/debug.cc
rename to src/debug/debug.cc
index eaaf171ca4c8809502b9bd28a46fa67902fc969b..178ff299d2853d54036100f07799b131776cfabc 100644 (file)
@@ -11,8 +11,7 @@
 #include "squid.h"
 #include "base/Optional.h"
 #include "base/TextException.h"
-#include "Debug.h"
-#include "DebugMessages.h"
+#include "debug/Stream.h"
 #include "fd.h"
 #include "ipc/Kids.h"
 #include "SquidTime.h"
@@ -32,7 +31,6 @@ bool Debug::log_syslog = false;
 int Debug::Levels[MAX_DEBUG_SECTIONS];
 char *Debug::cache_log = NULL;
 int Debug::rotateNumber = -1;
-DebugMessages TheDebugMessages;
 
 /// a counter related to the number of debugs() calls
 using DebugRecordCount = uint64_t;
@@ -1362,49 +1360,3 @@ ForceAlert(std::ostream& s)
     return s;
 }
 
-void
-PrintHex(std::ostream &os, const char *data, const size_t n)
-{
-    if (!n)
-        return;
-    assert(data);
-
-    const auto savedFill = os.fill('0');
-    const auto savedFlags = os.flags(); // std::ios_base::fmtflags
-    os << std::hex;
-    std::for_each(data, data + n,
-    [&os](const char &c) { os << std::setw(2) << static_cast<uint8_t>(c); });
-    os.flags(savedFlags);
-    os.fill(savedFill);
-}
-
-std::ostream &
-Raw::print(std::ostream &os) const
-{
-    if (label_)
-        os << ' ' << label_ << '[' << size_ << ']';
-
-    if (!size_)
-        return os;
-
-    // finalize debugging level if no level was set explicitly via minLevel()
-    const int finalLevel = (level >= 0) ? level :
-                           (size_ > 40 ? DBG_DATA : Debug::SectionLevel());
-    if (finalLevel <= Debug::SectionLevel()) {
-        if (label_)
-            os << '=';
-        else if (useGap_)
-            os << ' ';
-        if (data_) {
-            if (useHex_)
-                PrintHex(os, data_, size_);
-            else
-                os.write(data_, size_);
-        } else {
-            os << "[null]";
-        }
-    }
-
-    return os;
-}
-
index b889759bfbb2e53a01c66f09f4cc2514addf413a..a36579397bca4331b596fda8bd5bd4c69dc89a95 100644 (file)
@@ -18,7 +18,7 @@
 #include "comm/Loops.h"
 #include "comm/Read.h"
 #include "comm/Write.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "dlink.h"
 #include "dns/forward.h"
 #include "dns/rfc3596.h"
index 871613eeba33ccde93df3f37ceef84d2606eb8c9..e0733d7726087a827e166be427b9a46978353e11 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 04    Error Management */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "error/Error.h"
 
 void
index 188371fa6740f4f5ff453efb6aa3bd56497ba7ed..32dcdfb966a704b246e1aa29be210e1ca1776263 100644 (file)
@@ -10,7 +10,7 @@
 #define SQUID_ESIELEMENT_H
 
 #include "base/RefCount.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "esi/Segment.h"
 
 #include <vector>
index 72d849af6a97ef1ad61c4b4f4d0068c318ae84ba..84fd43c6042cd3cb66a110c82942278b128c49ec 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 86    ESI processing */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "esi/Esi.h"
 #include "esi/Expression.h"
 
index 773827e4494aa9f2c2c80782741f7eea79cff652..256c2585e0603fa564a4cfaf19e1ac82b5230eee 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 86    ESI processing */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "esi/Parser.h"
 #include "fatal.h"
 
index 7101b573e4049ce8234d82e2a1e713a554b05d58..2e20d745a7c3719eaf91fb664406e85d75d989bb 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 86    ESI processing */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "esi/Segment.h"
 #include "SquidString.h"
 
index 74ffa61d4045c5dd216d2fcc6964ddae23a4c37e..d5622ab6bfcbfe7b27c30377ce0b709f9f6fac3a 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 86    ESI processing */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fatal.h"
 
 /* MS Visual Studio Projects are monolithic, so we need the following
index f64e8a69e23ef9a3f343b69872ce2d43563277be..f85b0a44c87e5e4c17474bd6034393415aa181e9 100644 (file)
@@ -12,7 +12,7 @@
 
 #if USE_SQUID_EUI
 
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "eui/Eui48.h"
 #include "globals.h"
 #include "ip/Address.h"
index d513af7a0ec786dc4e784d66b58eb28a005474a8..f36126fc8319674afdd4c251e644847350b9d364 100644 (file)
@@ -13,7 +13,7 @@
 #if USE_SQUID_EUI
 
 #include "compat/eui64_aton.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "eui/Eui64.h"
 #include "globals.h"
 #include "ip/Address.h"
index e95a2d06671a239c3b232e14ae6ea86f3db5604a..8860d8469e31761ab3efe8bcba83a45bed95201d 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fatal.h"
 #include "globals.h"
 #include "store/Disks.h"
index 29951854ee4e6b113f8779d04503800c1d68de38..98e0df62c5444ed847ac19bf3c70a68955590c58 100644 (file)
--- a/src/fd.cc
+++ b/src/fd.cc
@@ -10,8 +10,8 @@
 
 #include "squid.h"
 #include "comm/Loops.h"
-#include "Debug.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
+#include "debug/Stream.h"
 #include "fatal.h"
 #include "fd.h"
 #include "fde.h"
index dda30ab8cf9993289909cb4cc2a057c7ebfab09b..32659420b8d4e709d7fc05e6977096eccc7c9731 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "comm/Read.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fd.h"
 #include "fde.h"
 #include "globals.h"
index f4f9b1d2ab5e9540c9f428541f943f95e5377315..5ab51a2279bec9a8f2d8f5479a197b744af264e1 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 08    Swap File Bitmap */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "FileMap.h"
 
 /* Number of bits in a long */
index 5ed3df9eb76fd66ff39cea125a772d59b3ae71c2..8264067aeb6e4ec288e4ec2940ceb75c349856de 100644 (file)
@@ -9,7 +9,7 @@
 #include "squid.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "format/Config.h"
 #include <list>
 
index 5750d3a9f18cb201207d02b79707172cd2b00c35..c5f03d4d11bb4c3e45725a1cea5b3be1cd6bd1e8 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/AsyncJobCalls.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fs/rock/RockHeaderUpdater.h"
 #include "fs/rock/RockIoState.h"
 #include "mime_header.h"
index c7c72293e1768731d95f9a73c60ccd0314827e29..5d23c8c515d706496df538efa90feb3dd88e3969 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "base/AsyncJobCalls.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "fs/rock/RockDbCell.h"
 #include "fs/rock/RockRebuild.h"
 #include "fs/rock/RockSwapDir.h"
index de866b1f24c250d45266502b4dcc2ed3c766d36e..b1fc1f5959a7ef91f6cd505ad6b04695529654ed 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "md5.h"
 #include "StoreSwapLogData.h"
 #include "swap_log_op.h"
index 88efa264f585b71b58f969cf4a4406445f69e11e..8704aecb306be69edf412e93f6d650ddcd34c02c 100644 (file)
 #include "squid.h"
 #include "base/AsyncCbdataCalls.h"
 #include "base/Packable.h"
+#include "base/Raw.h"
 #include "comm.h"
 #include "comm/Connection.h"
 #include "comm/Read.h"
 #include "comm/Write.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "fd.h"
 #include "fde.h"
 #include "format/Quoting.h"
index 2b9f4bd0309aef66dff9f906c692e47700d6a536..be7c5bb4dfee013289f1c7fa12a969e25c545e6d 100644 (file)
@@ -9,7 +9,7 @@
 #include "squid.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "helper/ChildConfig.h"
 #include "Parsing.h"
index b877b2d9ac0f3261294c36e85881a8f5ebcdcb25..a4da56f773b0026a2e28c391985b64d8789c6ed9 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "helper.h"
 #include "helper/Reply.h"
 #include "rfc1738.h"
index c9d050a52a401d84af7aa8165e07c7f89896b39a..4e862316f52d79579ba5d38c4feea161b023dce9 100644 (file)
@@ -18,7 +18,7 @@
 #include "comm/Loops.h"
 #include "comm/UdpOpenDialer.h"
 #include "compat/xalloc.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "globals.h"
 #include "htcp.h"
 #include "http.h"
index 147056adc031eb36d7f87887f74f047c512473e5..b5c216a1bce80c78988c979d4c1d693d3dc6890e 100644 (file)
@@ -16,6 +16,7 @@
 #include "squid.h"
 #include "acl/FilledChecklist.h"
 #include "base/AsyncJobCalls.h"
+#include "base/Raw.h"
 #include "base/TextException.h"
 #include "base64.h"
 #include "CachePeer.h"
index 076afa886383f189836c400e60aa97e9b1e662fe..09b175ae14e2f53523c7fcbd24555d474be61ea7 100644 (file)
@@ -10,7 +10,8 @@
 
 #include "squid.h"
 #include "base/CharacterSet.h"
-#include "Debug.h"
+#include "base/Raw.h"
+#include "debug/Stream.h"
 #include "http/ContentLengthInterpreter.h"
 #include "http/one/Parser.h"
 #include "HttpHeaderTools.h"
index 230a33e743d074886cac8c9e04c17627c1fbad89..50e110cabc0be6159240793cb9265bd7509f0818 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 74    HTTP Message */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/ContentLengthInterpreter.h"
 #include "http/Message.h"
 #include "http/one/Parser.h"
index 2a9bde601977a0a9dc8c756c8bf47996d093b27b..71bde0343ba15848abfbc3644eee429bbdc547d5 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/StatusCode.h"
 
 const char *
index 911e4af4795b3dfc3476cc86810839653f5138d3..92866b018174af2b63664e9987381552103ef01e 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "base/Packable.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/one/ResponseParser.h"
 #include "http/StatusLine.h"
 #include "parser/forward.h"
index 8e62de4ee393f80e610a6db3bbc4692d45dc3826..7826643b4c61920dc862fb3ec555b4fe51a24dad 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/CharacterSet.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/one/Parser.h"
 #include "mime_header.h"
 #include "parser/Tokenizer.h"
index 3d7798ed210027c5686c439c0fd408fb1955324a..dc614a4e0839b94e5c2410cdc4fb45dc1b82f52b 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/one/RequestParser.h"
 #include "http/ProtocolVersion.h"
 #include "parser/Tokenizer.h"
index 8025d210ca7925da375975723de18ca5ddc74cd8..876cd53064a69691378427ef50254b2c27802fa9 100644 (file)
@@ -7,7 +7,8 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "base/Raw.h"
+#include "debug/Stream.h"
 #include "http/one/ResponseParser.h"
 #include "http/ProtocolVersion.h"
 #include "parser/Tokenizer.h"
index 132d4d0b8c38a578e2c63ea26bed5a34921b8784..a87b8492dad3a699f9b614ce1decf16666cbe37a 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/one/TeChunkedParser.h"
 #include "http/one/Tokenizer.h"
 #include "http/ProtocolVersion.h"
index 0d54c0beaa9fe82130e6b7f9f10ac8d840acb372..6c4562eff0dda37b7deb77b37f8e147b092953da 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/one/Parser.h"
 #include "http/one/Tokenizer.h"
 #include "parser/Tokenizer.h"
index ee36bb4bccba9560b0fba1bc18d42fc9f53f09f5..a7af5596f8af0c90cffd7f00458b1948275cf370 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 37    ICMP Routines */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "Icmp.h"
 #include "SquidTime.h"
 
index d4da2326743bfdf27077db1fb4f4c8291a96777c..68a2a27a5c767bf2728f4e8c60128b94ccf46b72 100644 (file)
@@ -14,7 +14,7 @@
 
 #if USE_ICMP
 
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "Icmp4.h"
 #include "IcmpPinger.h"
 #include "SquidTime.h"
index 727d3da1c13f7785905722a1c8c0186c97ecd590..5fce0481c9aa23fdf570801221e532fa3a238407 100644 (file)
@@ -14,7 +14,7 @@
 
 #if USE_ICMP
 
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "Icmp6.h"
 #include "IcmpPinger.h"
 #include "SquidTime.h"
index 259cb7a97886068b0e50c9e3025674b451159304..3b0412fbcd1d8246331e89703252f00f26550a6f 100644 (file)
@@ -14,7 +14,7 @@
 
 #if USE_ICMP
 
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "Icmp4.h"
 #include "Icmp6.h"
 #include "IcmpPinger.h"
index b38aff12fb754b7604a0fd5a0c65ee386def8702..64bdcfd5abe2cc7c75eee43490e1ef1139770d38 100644 (file)
@@ -36,7 +36,6 @@ libicmp_la_LIBADD= libicmpcore.la
 
 # pinger depends on these but install/dist is done elsewhere.
 COPIED_SOURCE= \
-       debug.cc \
        globals.cc \
        SquidConfig.cc \
        tests/stub_fd.cc \
@@ -61,6 +60,7 @@ pinger_LDFLAGS = $(LIBADD_DL)
 pinger_LDADD=\
        libicmpcore.la \
        $(top_builddir)/src/ip/libip.la \
+       $(top_builddir)/src/debug/libdebug.la \
        $(top_builddir)/src/base/libbase.la \
        $(COMPAT_LIB) \
        $(SSLLIB) \
@@ -83,9 +83,6 @@ CLEANFILES += $(COPIED_SOURCE)
 
 ## files we need to pull in from other locations
 ## copied like this to avoid subdir-objects collisions on 'make clean'
-debug.cc: $(top_srcdir)/src/debug.cc
-       cp $(top_srcdir)/src/debug.cc $@
-
 globals.cc: $(top_srcdir)/src/globals.h
        cp $(top_builddir)/src/globals.cc $@
 
index b2fdc682e74469896818c62cc2a15e895d164098..188e8af439f6c3444bba46ec7db9ac69d30b3b67 100644 (file)
@@ -40,7 +40,7 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "SquidTime.h"
 
 #if USE_ICMP
index 215b72e179c230ae5ff49168e0105fde004a7829..10890306d0eabf7db834828b11755364b3587d1a 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 14    IP Storage and Handling */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ip/Address.h"
 #include "ip/tools.h"
 #include "util.h"
index 2c8f8e41b7978f0be220239e286a976e5f738d4a..d87b2dd0d4e1424f64d26d8e2046347a40478580 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "squid.h"
-
+#include "base/IoManip.h"
 #include "ConfigParser.h"
 #include "ip/NfMarkConfig.h"
 #include "parser/Tokenizer.h"
index 7bc7c03c487a9ba4ef0737d4fea998f3825207f5..91498a4043f73340cfa4eb4dffd3477c90372ec7 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "squid.h"
 #include "acl/Gadgets.h"
+#include "base/IoManip.h"
 #include "cache_cf.h"
 #include "comm/Connection.h"
 #include "compat/cmsg.h"
index cff35b14750e2901f4fda41d793a7d955a2bea07..bd7459420db24625dfc8ec3f1cee0579db0d3288 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 21    Misc Functions */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ip/Address.h"
 #include "ip/tools.h"
 
index 1288b238f638c0b523195cb9b4e46252ce68e3e8..349674f50dfde5ff718b7e78d0b8d47480631f13 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 54    Interprocess Communication */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ipc/FdNotes.h"
 
 const char *
index 70d161e50bb6f22049da4a93931e3ec213a19139..d29f237886a4180c144dd3970dd255341aaa1f95 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_IPC_STORE_MAP_H
 #define SQUID_IPC_STORE_MAP_H
 
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ipc/mem/FlexibleArray.h"
 #include "ipc/mem/Pointer.h"
 #include "ipc/ReadWriteLock.h"
index f55ca0cb6b20a4f38de226b90664ece1a5f94961..71f715ff9572c472463907bdbc012017744668a6 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "ipc/Queue.h"
 
index 379512427f18f862a293d35f1fb784e77bacc5e3..37a76bf2ac939f7214d42b5b1a07dae32e41dcff 100644 (file)
@@ -10,7 +10,7 @@
 #define SQUID_IPC_QUEUE_H
 
 #include "base/InstanceId.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ipc/mem/FlexibleArray.h"
 #include "ipc/mem/Pointer.h"
 #include "util.h"
index 76f3ae2abfc5f4b22f604c21d51d521877bd7e47..b51deb11ee5298e40e841029a3da9fd0f43865e9 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ipc/RequestId.h"
 
 #include <iostream>
index 34f2730a79e1b6b54cea92934c23a51fcf92fca3..dd3622a44de8121d115b079d98f9934f78ff0de6 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 54    Interprocess Communication */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "ipc/Port.h"
 #include "ipc/StrandCoord.h"
index 3dbc2e68197489bf98dfb617b5fcbe0c9e7496cc..e5e5ee1b2a1fe039440842fa5645e4a888af3c26 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ipc/mem/Page.h"
 #include "ipc/mem/PageStack.h"
 
index fc2491e7827008f255dfb1a447523bfc739ad9ba..bc32c512c1630462b1d8ba0e2dd32c01cff07d2a 100644 (file)
@@ -11,7 +11,7 @@
 #include "squid.h"
 #include "base/TextException.h"
 #include "compat/shm.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fatal.h"
 #include "ipc/mem/Segment.h"
 #include "sbuf/SBuf.h"
index ceda458a180096110478a5cc848726ae90462492..275ec0448fdc6e19eb2da770123aa7c3315f67ff 100644 (file)
@@ -11,7 +11,7 @@
 #include "squid.h"
 #include "CacheManager.h"
 #include "cbdata.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "dlink.h"
 #include "dns/LookupDetails.h"
 #include "dns/rfc3596.h"
index 8e73f57ca1df7371110d67d0ba26bd45a8aeeb29..018a9c30d8b87a4dfeb5895bc7358c3f68e15292 100644 (file)
@@ -9,7 +9,7 @@
 #include "squid.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "log/Config.h"
 
 Log::LogConfig Log::TheConfig;
index 88049f340a36d0753e5c29c5ee8f8158444397c4..5128c2a3d8f76970b133acdacbbe54d89a093268 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 50    Log file handling */
 
 #include "squid.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "fatal.h"
 #include "fde.h"
 #include "log/File.h"
index 7b795bbd6c478a297db22255cd6f1036d1c44c07..a48cba6a6302b858ee1bd98bcf669c71ffa2be6f 100644 (file)
@@ -10,7 +10,7 @@
 #include "acl/Gadgets.h"
 #include "base/TextException.h"
 #include "cache_cf.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "log/Config.h"
 #include "log/File.h"
 #include "log/FormattedLog.h"
index 0c7ef8f25c86eda48b0c80cde1a7d7ec5b707197..53106d983b258c8bbaed7824a55ff9cc3f415656 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 50    Log file handling */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
 #if HAVE_SYSLOG
 
index b5fcdb72e7a198f65ff146a1835877e6f80b0421..61f0df41a2b22b9a098a0f45f9730c567cd85776 100644 (file)
@@ -29,7 +29,7 @@
 #include "CommandLine.h"
 #include "ConfigParser.h"
 #include "CpuAffinity.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "DiskIO/DiskIOModule.h"
 #include "dns/forward.h"
 #include "errorpage.h"
index 04a6c321497094c01b3747aef10f102b71af0f53..52d6209dc4d78c1609f8a59c8faf57074b8ee6ef 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ipc/TypedMsgHdr.h"
 #include "mgr/IntParam.h"
 
index edf94b975c2896d1734c0b9b40b13435ca15075a..83da9fba0013ca70c41a6039fcb9c3ad35911e6e 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 25    MIME Parsing and Internal Icons */
 
 #include "squid.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "fde.h"
 #include "fs_io.h"
 #include "globals.h"
index cb198a42d04e3760e9c50935fb0002cb9af8285c..0fb4e9cea7eb6c4ebaa34669c3ef68625216bc63 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 25    MiME Header Parsing */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "mime_header.h"
 #include "sbuf/SBuf.h"
 
index 6046b1be01b93f2c664b238227c7555779419908..3977e236b98a0c613da1de5f1dec25da6e062147 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "comm/Connection.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 // XXX: for icpIncomingConn - need to pass it as a generic parameter.
 #include "ICP.h"
 #include "ipcache.h"
index cd0875cff008ba9ec38a729abe25660c0292d36c..57af67da96d3bb77be281af41b2fb7e7905fe62d 100644 (file)
@@ -16,7 +16,7 @@
 #include "CachePeer.h"
 #include "comm/Connection.h"
 #include "comm/ConnOpener.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "event.h"
 #include "FwdState.h"
 #include "globals.h"
index 66bd1b72b81b2cf711143d8582ba8a7ac711965f..71f15cd954279ab1ba6439896e55525d4cfc2f17 100644 (file)
@@ -9,6 +9,7 @@
 /* DEBUG: section 24    SBuf */
 
 #include "squid.h"
+#include "base/Raw.h"
 #include "ip/Address.h"
 #include "parser/BinaryTokenizer.h"
 
index a8a940778334ecf2c56c19af4df419cccb07fbae..9706a7504e8916260e897bd83778648310a15d9d 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 24    SBuf */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "parser/forward.h"
 #include "parser/Tokenizer.h"
 #include "sbuf/Stream.h"
index 8544771ef3706d261371498dbe83fe2c407ef70a..77dc87a79fa507d050f44cf4b3f13e520a55d3a8 100644 (file)
@@ -19,7 +19,7 @@
 #endif
 
 #include "base64.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "peer_proxy_negotiate_auth.h"
 
 #ifdef __cplusplus
index f9dae0992e9523a29ac54a1d9096c75293e9b347..7993f476dabf06a62d6ca0d08b55e819999cfb43 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/DetailedStats.h"
 #include "sbuf/MemBlob.h"
 
index 4f1b438ddf24ed9368e7f62b769320115bd11997..af044c9ca0e8e51e01031dd5f1bc940aee70202c 100644 (file)
@@ -8,8 +8,9 @@
 
 #include "squid.h"
 #include "base/CharacterSet.h"
+#include "base/Raw.h"
 #include "base/RefCount.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "sbuf/DetailedStats.h"
 #include "sbuf/SBuf.h"
 #include "util.h"
index d02f29cfc0114b959b780445d5b7ca9ba48433bf..7373120b3d6e9a1832be8df049b9b0e0a8aa9975 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "base/InstanceId.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "sbuf/forward.h"
 #include "sbuf/MemBlob.h"
index c6f02eb245c6fb5dd57f347de931c2b6bb936235..b032a9a0cab408838fe1b1327f902e7c4be8485b 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "squid.h"
 #include "base/CharacterSet.h"
+#include "base/IoManip.h"
 #include "security/CommunicationSecrets.h"
 #include "security/Session.h"
 
index 8c10408dbda871d3a9168e3c8001333e2944da81..129c4a41d03715b2e734f71a1413f00226662ee9 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "squid.h"
+#include "base/IoManip.h"
 #include "error/SysErrorDetail.h"
 #include "html_quote.h"
 #include "sbuf/SBuf.h"
index dbf0544c7662b1932f5b74dbd724ff1261a44578..fd59d43939d4afdf86ea432a53c95d3e861ec2a6 100644 (file)
@@ -9,6 +9,7 @@
 /* DEBUG: section 83    SSL-Bump Server/Peer negotiation */
 
 #include "squid.h"
+#include "base/IoManip.h"
 #include "sbuf/Stream.h"
 #include "security/Handshake.h"
 #if USE_OPENSSL
index f8f2745e38f2dc2ec7ad48b85308f8f243c96391..7ea81dffec94522e22b0406f933a21d50b228b61 100644 (file)
@@ -9,6 +9,7 @@
 /* DEBUG: section 83    TLS I/O */
 
 #include "squid.h"
+#include "base/IoManip.h"
 #include "fde.h"
 #include "security/Io.h"
 
index 51523b9b8f09a4cedcda8727c321ffe35ee10be7..7e96485fc788cd8654fe06d81eccad0fad8c8315 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "squid.h"
 #include "acl/FilledChecklist.h"
+#include "base/IoManip.h"
 #include "comm/Loops.h"
 #include "comm/Read.h"
 #include "Downloader.h"
index 3c290b3244b8636ef35c12dfa2913e13827d7caa..eb82e9c9ce98cc84893c2a069de0711fa83c410a 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "base/Packable.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fatal.h"
 #include "globals.h"
 #include "parser/Tokenizer.h"
index 5aaff2269038f99901d093b499bfaed65068ffc1..092528d43ed7cef2414a9e4d1a9d300d52ae4527 100644 (file)
@@ -12,7 +12,7 @@
 #include "anyp/PortCfg.h"
 #include "base/RunnersRegistry.h"
 #include "CachePeer.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "fd.h"
 #include "fde.h"
 #include "ipc/MemMap.h"
index d22148c5a07674f252b0f37725fe05028b3b5084..472b8b242d8c5f4d3b4d6c9563a812436978b0d3 100644 (file)
@@ -11,6 +11,7 @@
 #include "squid.h"
 #include "acl/FilledChecklist.h"
 #include "base/CharacterSet.h"
+#include "base/Raw.h"
 #include "base/RefCount.h"
 #include "base/Subscription.h"
 #include "client_side_reply.h"
index fec88dfaa4cbb3e3f0a6fe60fb02eda603532f25..5753c63f2f9b6542b2dd2f64b9f6caf46dea25ca 100644 (file)
@@ -11,7 +11,7 @@
 #include "client_side.h"
 #include "comm.h"
 #include "comm/Read.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "error/SysErrorDetail.h"
 #include "fd.h"
 #include "fde.h"
index f0f54e7bde4353d4683ba12a0f085529b5a8c601..4523090076621e84c64234891408c91e46b5420b 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "squid.h"
 #include "base/TextException.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "ipc/TypedMsgHdr.h"
 #include "snmp/Var.h"
 #include "tools.h"
index 44a605e9e589ad1bba657913a106bb5d24c1af54..04da3f02dec3fb7255817bd8d6d3ca12aca5ebbd 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "squid.h"
+#include "base/Raw.h"
 #include "ErrorDetail.h"
 #include "ErrorDetailManager.h"
 #include "errorpage.h"
index 55de1fc92909bda7685170ced8dff7d0ab878ed2..f38e0cd380dc500dea66d7a2987f9e3b044afb84 100644 (file)
@@ -14,6 +14,7 @@
 /* support.cc says this is needed */
 #if USE_OPENSSL
 
+#include "base/Raw.h"
 #include "comm.h"
 #include "fd.h"
 #include "fde.h"
index 164e18faf416a62465202f922dcaa9a9ec9eee45..013083ed5f3502f5e473234c4635741c1432b245 100644 (file)
@@ -17,7 +17,7 @@
 #include "CollapsedForwarding.h"
 #include "comm/Connection.h"
 #include "comm/Read.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #if HAVE_DISKIO_MODULE_IPCIO
 #include "DiskIO/IpcIo/IpcIoFile.h"
 #endif
index d9eeb10213f41e21419e92bd16fbece4603a598a..49d3256b16665e723509b5997bbfe6d2823b2b45 100644 (file)
@@ -11,8 +11,8 @@
 #include "squid.h"
 #include "cache_cf.h"
 #include "ConfigParser.h"
-#include "Debug.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "sbuf/Stream.h"
 #include "SquidConfig.h"
index 18620248c588e4cecd6b2f9f793dc4c24b00e50a..d65b3c25e3d538e5d81ce6a1ee375c47b87520a6 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 47    Store Search */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "globals.h"
 #include "store/LocalSearch.h"
 #include "StoreSearch.h"
index d6e5a3f8b302005fca44b00c2af75d00621c6d55..7be186d57d36aeb7768810226255992b51f6c7de 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "event.h"
 #include "globals.h"
 #include "mgr/Registration.h"
index 2357c8abf115aad7c9d6425fcfc97fd7245268c6..02f53ef9f47de7c5d2132527e4b97a4e6c37899c 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 20    Storage Manager Logging Functions */
 
 #include "squid.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "format/Token.h"
 #include "HttpReply.h"
 #include "log/File.h"
index c994c57a0630964c803d9cbe34f4e3846573c4f9..d111350666968d440517f19e8d82ca8b37f11772 100644 (file)
@@ -9,7 +9,7 @@
 /* DEBUG: section 20    Store Rebuild Routines */
 
 #include "squid.h"
-#include "DebugMessages.h"
+#include "debug/Messages.h"
 #include "event.h"
 #include "globals.h"
 #include "md5.h"
index 2fab12a18c506a23be6e37f1223d8be983e4bbd5..669d8be7acb43cd3b106e727e0c756be3773b180 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "squid.h"
 #include "CacheManager.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "mgr/Registration.h"
 
 #define STUB_API "cache_manager.cc"
index 55f9a0ffdf86a4893ce75709276fe8953a9440bf..3180639c88e0b8194de97314684ed2a380b941aa 100644 (file)
@@ -14,9 +14,9 @@
  * not abort the unit test.
  */
 #include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 
-#define STUB_API "debug.cc"
+#define STUB_API "debug/libdebug.la"
 #include "tests/STUB.h"
 
 char *Debug::debugOptions;
@@ -96,26 +96,3 @@ ForceAlert(std::ostream& s)
     return s;
 }
 
-std::ostream &
-Raw::print(std::ostream &os) const
-{
-    if (label_)
-        os << ' ' << label_ << '[' << size_ << ']';
-
-    if (!size_)
-        return os;
-
-    // finalize debugging level if no level was set explicitly via minLevel()
-    const int finalLevel = (level >= 0) ? level :
-                           (size_ > 40 ? DBG_DATA : Debug::SectionLevel());
-    if (finalLevel <= Debug::SectionLevel()) {
-        os << (label_ ? '=' : ' ');
-        if (data_)
-            os.write(data_, size_);
-        else
-            os << "[null]";
-    }
-
-    return os;
-}
-
index aba57e5408f04c6dbf1faedafa1dd21ba4c5a947..887b63280a505cabf80d45983c5c8d266ed2dc1b 100644 (file)
@@ -13,7 +13,7 @@
 #define private public
 #define protected public
 
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "http/one/RequestParser.h"
 #include "http/RequestMethod.h"
 #include "MemBuf.h"
index 6589b5f2191761d2a8c385b37fa6a6c9b27d3fe2..902170f7cefd1b2a271223adcf9aa765fb9e5ab1 100644 (file)
@@ -11,7 +11,7 @@
 #include <cppunit/TestAssert.h>
 
 #include "anyp/Uri.h"
-#include "Debug.h"
+#include "debug/Stream.h"
 #include "tests/testURL.h"
 #include "unitTestMain.h"
 
index 82529a726fce96f6d849208e6893c9f068ef92b8..0bcae01152762fe40e6acf62a1bbd9a2bd36af3b 100644 (file)
@@ -12,6 +12,7 @@
 #include "acl/FilledChecklist.h"
 #include "base/CbcPointer.h"
 #include "base/JobWait.h"
+#include "base/Raw.h"
 #include "CachePeer.h"
 #include "cbdata.h"
 #include "client_side.h"
index e0735b0a3bb1fc217794893376298d6b4bf449b5..2076a856e19f15140018a4c9647791d778170fef 100644 (file)
@@ -34,7 +34,7 @@ else
 endif
 
 ## Sort by dependencies - test lowest layers first
-TESTS += debug \
+TESTS += \
        syntheticoperators \
        VirtualDeleteOperator \
        splay\
@@ -44,7 +44,7 @@ TESTS += debug \
        squid-conf-tests
 
 ## Sort by alpha - any build failures are significant.
-check_PROGRAMS += debug \
+check_PROGRAMS += \
                $(ESI_TESTS) \
                mem_node_test\
                mem_hdr_test \
@@ -59,11 +59,11 @@ tcp_banger2_LDADD = $(top_builddir)/lib/libmiscutil.la
 # several tests whose purpose is testing libmem itself.
 STUBS = \
        stub_cbdata.cc \
-       stub_debug.cc \
        stub_MemBuf.cc \
        stub_SBuf.cc \
        stub_tools.cc \
        stub_fatal.cc \
+       stub_fd.cc \
        STUB.h
 DEBUG_SOURCE = test_tools.cc $(STUBS)
 CLEANFILES += $(STUBS) stub_libmem.cc
@@ -71,9 +71,6 @@ CLEANFILES += $(STUBS) stub_libmem.cc
 stub_cbdata.cc: $(top_srcdir)/src/tests/stub_cbdata.cc
        cp $(top_srcdir)/src/tests/stub_cbdata.cc $@
 
-stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc
-       cp $(top_srcdir)/src/tests/stub_debug.cc $@
-
 stub_MemBuf.cc: $(top_srcdir)/src/tests/stub_MemBuf.cc
        cp $(top_srcdir)/src/tests/stub_MemBuf.cc $@
 
@@ -86,25 +83,21 @@ stub_tools.cc: $(top_srcdir)/src/tests/stub_tools.cc
 stub_fatal.cc: $(top_srcdir)/src/tests/stub_fatal.cc
        cp $(top_srcdir)/src/tests/stub_fatal.cc $@
 
+stub_fd.cc: $(top_srcdir)/src/tests/stub_fd.cc
+       cp $(top_srcdir)/src/tests/stub_fd.cc $@
+
 stub_libmem.cc: $(top_srcdir)/src/tests/stub_libmem.cc STUB.h
        cp $(top_srcdir)/src/tests/stub_libmem.cc $@
        
 STUB.h: $(top_srcdir)/src/tests/STUB.h
        cp $(top_srcdir)/src/tests/STUB.h $@
 
-## XXX: somewhat broken. Its meant to test our debugs() implementation.
-## but it has never been linked to the actual src/debug.cc implementation !!
-## all it tests are the stream operators and macro in src/Debug.h
-debug_SOURCES = \
-       $(DEBUG_SOURCE) \
-       debug.cc \
-       stub_libmem.cc
-
 ESIExpressions_SOURCES = \
        $(DEBUG_SOURCE) \
        ESIExpressions.cc \
        stub_libmem.cc
 ESIExpressions_LDADD = $(top_builddir)/src/esi/Expression.o \
+       $(top_builddir)/src/debug/libdebug.la \
                $(LDADD)
 
 mem_node_test_SOURCES = \
@@ -113,6 +106,7 @@ mem_node_test_SOURCES = \
 mem_node_test_LDADD = \
        $(top_builddir)/src/mem_node.o \
        $(top_builddir)/src/mem/libmem.la \
+       $(top_builddir)/src/debug/libdebug.la \
        $(LDADD)
 
 mem_hdr_test_SOURCES = \
@@ -122,6 +116,7 @@ mem_hdr_test_LDADD = \
        $(top_builddir)/src/stmem.o \
        $(top_builddir)/src/mem_node.o \
        $(top_builddir)/src/mem/libmem.la \
+       $(top_builddir)/src/debug/libdebug.la \
        $(LDADD)
 
 splay_SOURCES = \
diff --git a/test-suite/debug.cc b/test-suite/debug.cc
deleted file mode 100644 (file)
index 44435ed..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-/* DEBUG: section 19    Store Memory Primitives */
-
-#include "squid.h"
-#include "Debug.h"
-#include "mem_node.h"
-#include "stmem.h"
-
-class StreamTest
-{
-public:
-    std::ostream &serialise(std::ostream &);
-    int getAnInt() const;
-    char const *getACString() const;
-};
-
-static std::ostream &
-operator << (std::ostream &aStream, StreamTest &anObject)
-{
-    return anObject.serialise(aStream);
-}
-
-std::ostream&
-StreamTest::serialise(std::ostream &aStream)
-{
-    aStream << "stream test";
-    return aStream;
-}
-
-int
-StreamTest::getAnInt() const
-{
-    return 5;
-}
-
-char const *
-StreamTest::getACString() const
-{
-    return "ThisIsAStreamTest";
-}
-
-int
-main(int, char *[])
-{
-    Debug::Levels[1] = 8;
-    debugs (1,1,"test" << "string");
-    debugs (1,9,"do not show this" << "string");
-    debugs (1,1,"test" << "string");
-    debugs (1,1,"test" << "string");
-    if (true)
-        debugs(1,9,"this won't compile if the macro is broken.");
-    else
-        debugs(1, DBG_IMPORTANT,"bar");
-    StreamTest aStreamObject;
-    StreamTest *streamPointer (&aStreamObject);
-    debugs(1, DBG_IMPORTANT,aStreamObject);
-    debugs(1, DBG_IMPORTANT,streamPointer->getAnInt() << " " << aStreamObject.getACString());
-    return EXIT_SUCCESS;
-}
-
index de1075e01b41104ae36b672bab18749e3ba110ba..d03edc4497d6142ae276f435c83a3e1e010cf67d 100644 (file)
 
 #include "squid.h"
 #include "dlink.h"
-#include <iostream>
-
-void
-xassert(const char *msg, const char *file, int line)
-{
-    std::cout << "Assertion failed: (" << msg << ") at " << file << ":" << line << std::endl;
-    exit (1);
-}
 
 void
 dlinkAdd(void *data, dlink_node * m, dlink_list * list)