a named FILE with very-early/late usage safety mechanisms
More...
|
| | DebugFile () |
| |
| | ~DebugFile () |
| |
| | DebugFile (DebugFile &&)=delete |
| |
| void | reset (FILE *newFile, const char *newName) |
| | switches to the new pair, absorbing FILE and duping the name
|
| |
| void | clear () |
| | go back to the initial state
|
| |
| FILE * | file () |
| | an opened cache_log stream or nil
|
| |
|
| FILE * | file_ = nullptr |
| | opened "real" file or nil; never stderr
|
| |
Definition at line 83 of file debug.cc.
◆ DebugFile() [1/2]
◆ ~DebugFile()
| DebugFile::~DebugFile |
( |
| ) |
|
|
inline |
◆ DebugFile() [2/2]
◆ clear()
| void DebugFile::clear |
( |
| ) |
|
|
inline |
◆ file()
| FILE * DebugFile::file |
( |
| ) |
|
|
inline |
◆ 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().
◆ ResyncDebugLog
| void ResyncDebugLog |
( |
FILE * |
newFile | ) |
|
|
friend |
◆ file_
| FILE* DebugFile::file_ = nullptr |
|
private |
◆ name
| char* DebugFile::name = nullptr |
The documentation for this class was generated from the following file: