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 93 of file debug.cc.
References reset().
Referenced by ~DebugFile(), _db_rotate_log(), debugOpenLog(), and Debug::StopCacheLogUse().
◆ file()
|
inline |
Definition at line 96 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 754 of file debug.cc.
References assert, Debug::cache_log, 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 |
◆ name
char* DebugFile::name = nullptr |
Definition at line 98 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