a named FILE with very-early/late usage safety mechanisms More...
Public Member Functions | |
DebugFile () | |
~DebugFile () | |
DebugFile (DebugFile &&)=delete | |
void | reset (FILE *newFile, const char *newName) |
switches to the new pair, absorbing FILE and duping the name More... | |
void | clear () |
go back to the initial state More... | |
FILE * | file () |
an opened cache_log stream or nil More... | |
Public Attributes | |
char * | name = nullptr |
Private Attributes | |
FILE * | file_ = nullptr |
opened "real" file or nil; never stderr More... | |
Friends | |
void | ResyncDebugLog (FILE *newFile) |
a hack for low-level file descriptor manipulations in ipcCreate() More... | |
Detailed Description
Constructor & Destructor Documentation
◆ DebugFile() [1/2]
◆ ~DebugFile()
◆ DebugFile() [2/2]
|
delete |
Member Function Documentation
◆ clear()
|
inline |
Definition at line 94 of file debug.cc.
References reset().
Referenced by _db_rotate_log(), debugOpenLog(), Debug::StopCacheLogUse(), and ~DebugFile().
◆ file()
|
inline |
Definition at line 97 of file debug.cc.
References file_.
Referenced by DebugModule::banCacheLogUse(), DebugStream(), Debug::LogMessage(), DebugModule::prepareToDie(), CacheLogChannel::shouldWrite(), Debug::StopCacheLogUse(), DebugModule::useCacheLog(), and CacheLogChannel::write().
◆ reset()
void DebugFile::reset | ( | FILE * | newFile, |
const char * | newName | ||
) |
Definition at line 755 of file debug.cc.
References assert, Debug::cache_log, commSetCloseOnExec(), fd_close(), FD_LOG, fd_open(), file_, name, xfree, and xstrdup.
Referenced by clear(), and debugOpenLog().
Friends And Related Function Documentation
◆ ResyncDebugLog
Member Data Documentation
◆ file_
|
private |
Definition at line 104 of file debug.cc.
Referenced by file(), reset(), and ResyncDebugLog().
◆ name
char* DebugFile::name = nullptr |
Definition at line 99 of file debug.cc.
Referenced by _db_rotate_log(), and reset().
The documentation for this class was generated from the following file:
- src/debug/debug.cc
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products