FEI Package Browser (Single Doxygen Collection)
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 () |
Private Member Functions | |
LogFile () | |
Private Attributes | |
FEI_OSTREAM * | output_stream_ |
unsigned | counter_ |
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.
|
private |
constructor
Definition at line 15 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.
References fei::console_out(), FEI_ENDL, FEI_OFSTREAM, FEI_OSTRINGSTREAM, filename, and IOS_OUT.
Referenced by fei::LogManager::setOutputLevel().
FEI_OSTREAM * fei::LogFile::getOutputStream | ( | ) |
Query for the log-file ostream.
Definition at line 57 of file fei_LogFile.cpp.
Referenced by fei::Logger::Logger(), and fei::Logger::setOutputLevel().
void fei::LogFile::closeOutputStream | ( | ) |
Destroy the log-file ostream (closes the file).
Definition at line 62 of file fei_LogFile.cpp.
Referenced by fei::Factory::~Factory().
|
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.
Referenced by fei::Logger::Logger(), fei::Logger::setOutputLevel(), fei::LogManager::setOutputLevel(), and fei::Factory::~Factory().
|
private |
Definition at line 56 of file fei_LogFile.hpp.
|
private |
Definition at line 57 of file fei_LogFile.hpp.