FEI
Version of the Day
|
#include <fei_LogFile.hpp>
Public Member Functions | |
virtual | ~LogFile () |
void | openOutputStream (const char *path=NULL, int nprocs=1, int localproc=0) |
FEI_OSTREAM * | getOutputStream () |
void | closeOutputStream () |
Static Public Member Functions | |
static LogFile & | getLogFile () |
Singleton class to manage (open, close, etc.) the one-and-only fei log file.
Definition at line 19 of file fei_LogFile.hpp.
|
virtual |
destructor
Definition at line 21 of file fei_LogFile.cpp.
void fei::LogFile::openOutputStream | ( | const char * | path = NULL , |
int | nprocs = 1 , |
||
int | localproc = 0 |
||
) |
Open a log-file ostream. If one is already open, it is closed before the new one is opened.
The file name is 'fei_log.counter.nprocs.localproc', where counter is the number of times this function has been called, and nprocs and localproc are specified in the arguments.
path | Path, not including file-name, to log-file. |
nprocs | Number of processors. |
localproc | Rank of local processor. |
Definition at line 27 of file fei_LogFile.cpp.
FEI_OSTREAM * fei::LogFile::getOutputStream | ( | ) |
Query for the log-file ostream.
Definition at line 57 of file fei_LogFile.cpp.
void fei::LogFile::closeOutputStream | ( | ) |
Destroy the log-file ostream (closes the file).
Definition at line 62 of file fei_LogFile.cpp.
|
static |
Accessor for the one-and-only instance of LogFile. Constructs a LogFile instance on the first call, returns that same instance on the first and all subsequent calls.
Definition at line 68 of file fei_LogFile.cpp.