|
Squid Web Cache master
|
Public Member Functions | |
| DebugModule () | |
| ~DebugModule ()=delete | |
| void | prepareToDie () |
| void | log (const DebugMessageHeader &, const CompiledDebugMessageBody &) |
| void | useCacheLog () |
| void | banCacheLogUse () |
Public Attributes | |
| CacheLogChannel | cacheLogChannel |
| StderrChannel | stderrChannel |
| SyslogChannel | syslogChannel |
Manages private module state that must be available during program startup and (especially) termination. Any non-trivial state objects must be encapsulated here because debugs() may be called before dynamic initialization or after the destruction of static objects in debug.cc.
| DebugModule::DebugModule | ( | ) |
Definition at line 435 of file debug.cc.
References DidResetSections, Debug::PrepareToDie(), and ResetSections().
|
delete |
| void DebugModule::banCacheLogUse | ( | ) |
Start using stderr as the primary debugs() destination. Stop waiting for an open cache_log file (if we were doing that).
Definition at line 492 of file debug.cc.
References assert, cacheLogChannel, DebugFile::file(), stderrChannel, StderrChannel::takeOver(), and TheLog.
Referenced by Debug::BanCacheLogUse(), debugOpenLog(), prepareToDie(), and Debug::StopCacheLogUse().
| void DebugModule::log | ( | const DebugMessageHeader & | header, |
| const CompiledDebugMessageBody & | body | ||
| ) |
Log the given debugs() message to appropriate channel(s) (eventually). Assumes the message has passed the global section/level filter.
Definition at line 447 of file debug.cc.
References cacheLogChannel, DebugChannel::log(), stderrChannel, and syslogChannel.
Referenced by Debug::LogMessage().
| void DebugModule::prepareToDie | ( | ) |
Reacts to ongoing program termination (e.g., flushes buffered messages). Call this before logging the termination reason to maximize the chances of that valuable debugs() getting through to the admin.
Definition at line 455 of file debug.cc.
References banCacheLogUse(), cacheLogChannel, DebugChannel::collectingEarlyMessages(), DebugFile::file(), Debug::LogWaitingForIdle(), stderrChannel, DebugChannel::stopEarlyMessageCollection(), syslogChannel, and TheLog.
Referenced by Debug::PrepareToDie().
| void DebugModule::useCacheLog | ( | ) |
Start using an open cache_log file as the primary debugs() destination. Stop using stderr as a cache_log replacement (if we were doing that).
Definition at line 484 of file debug.cc.
References assert, cacheLogChannel, DebugFile::file(), stderrChannel, StderrChannel::stopCoveringForCacheLog(), DebugChannel::stopEarlyMessageCollection(), and TheLog.
Referenced by debugOpenLog().
| CacheLogChannel DebugModule::cacheLogChannel |
Definition at line 320 of file debug.cc.
Referenced by banCacheLogUse(), log(), prepareToDie(), Debug::StopCacheLogUse(), and useCacheLog().
| StderrChannel DebugModule::stderrChannel |
Definition at line 321 of file debug.cc.
Referenced by banCacheLogUse(), log(), prepareToDie(), Debug::SettleStderr(), Debug::StderrEnabled(), and useCacheLog().
| SyslogChannel DebugModule::syslogChannel |
Definition at line 322 of file debug.cc.
Referenced by log(), prepareToDie(), and Debug::SettleSyslog().