查看squid中日志cache.log的debug_options。
设置为debug_options All,9 //打开所有section的日志。
若只想打开一个模块的debug日志,只需要配置 debug_options SecNum,DebugLevel。
其中 SecNum 对照表如下,DevbugLevel取(0-9) 数字越大,日志越详细。
section 0 Announcement Server
section 0 CGI Cache Manager
section 0 Client Database
section 0 Debug Routines
section 0 DNS Resolver
section 0 WWW Client
section 1 Startup and Main Loop
section 2 Unlink Daemon
section 3 Configuration File Parsing
section 4 Error Generation
section 5 Socket Functions
section 6 Disk I/O Routines
section 7 Multicast
section 8 Swap File Bitmap
section 9 File Transfer Protocol (FTP)
section 10 Gopher
section 11 Hypertext Transfer Protocol (HTTP)
section 12 Internet Cache Protocol
section 13 High Level Memory Pool Management
section 14 IP Cache
section 15 Neighbor Routines
section 16 Cache Manager Objects
section 17 Request Forwarding
section 18 Cache Manager Statistics
section 19 Store Memory Primitives
section 20 Storage Manager
section 21 Misc Functions
section 22 Refresh Calculation
section 23 URL Parsing
section 24 WAIS Relay
section 25 MIME Parsing
section 26 Secure Sockets Layer Proxy
section 27 Cache Announcer
section 28 Access Control
section 29 Authenticator
section 30 Ident (RFC 931)
section 31 Hypertext Caching Protocol
section 32 Asynchronous Disk I/O
section 33 Client-side Routines
section 34 Dnsserver interface
section 35 FQDN Cache
section 36 Cache Directory Cleanup
section 37 ICMP Routines
section 38 Network Measurement Database
section 39 Cache Array Routing Protocol
section 40 User-Agent and Referer logging
section 41 Event Processing
section 42 ICMP Pinger program
section 43 AIOPS
section 44 Peer Selection Algorithm
section 45 Callback Data Registry
section 46 Access Log
section 47 Store Directory Routines
section 48 Persistent Connections
section 49 SNMP
section 50 Log file handling
section 51 Filedescriptor Functions
section 52 URN Parsing
section 53 AS Number handling
section 54 Interprocess Communication
section 55 HTTP Header
section 56 HTTP Message Body
section 57 HTTP Status-line
section 58 HTTP Reply (Response)
section 59 auto-growing Memory Buffer with printf
section 60 Packer: A uniform interface to store-like modules
section 61 Redirector
section 62 Generic Histogram
section 63 Low Level Memory Pool Management
section 64 HTTP Range Header
section 65 HTTP Cache Control Header
section 66 HTTP Header Tools
section 67 String
section 68 HTTP Content-Range Header
section 69 HTTP Header: Extension Field
section 70 Cache Digest
section 71 Store Digest Manager
section 72 Peer Digest Routines
section 73 HTTP Request
section 74 HTTP Message
section 75 WHOIS protocol
section 76 Internal Squid Object handling
section 77 Delay Pools
section 78 DNS lookups
section 79 Lowlevel store I/O
section 80 WCCP
section 81 Cache Store
section 82 External ACL
section 83 SSL accelerator support
section 84 Helper process maintenance