a named FILE with very-early/late usage safety mechanisms More...

Collaboration diagram for DebugFile:

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

Definition at line 82 of file debug.cc.

Constructor & Destructor Documentation

◆ DebugFile() [1/2]

DebugFile::DebugFile ( )
inline

Definition at line 85 of file debug.cc.

◆ ~DebugFile()

DebugFile::~DebugFile ( )
inline

Definition at line 86 of file debug.cc.

References clear().

◆ DebugFile() [2/2]

DebugFile::DebugFile ( DebugFile &&  )
delete

Member Function Documentation

◆ clear()

void DebugFile::clear ( )
inline

Definition at line 93 of file debug.cc.

References reset().

Referenced by ~DebugFile(), _db_rotate_log(), debugOpenLog(), and Debug::StopCacheLogUse().

◆ file()

◆ 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

void ResyncDebugLog ( FILE *  newFile)
friend

Definition at line 514 of file debug.cc.

Member Data Documentation

◆ file_

FILE* DebugFile::file_ = nullptr
private

Definition at line 103 of file debug.cc.

Referenced by file(), and reset().

◆ 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:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors