Simpact Cyan
Population based event driven simulation using mNRM
|
Helper class to write to a log file. More...
#include <logfile.h>
Public Member Functions | |
bool_t | open (const std::string &fileName) |
Opens the specified file for writing. More... | |
std::string | getFileName () const |
Returns the filename from the 'open' call. More... | |
void | print (const char *format,...) |
Writes the specified parameters (similar to printf) to the logfile, automatically appending a newline character (\n). More... | |
void | printNoNewLine (const char *format,...) |
Writes the specified parameters (similar to printf) to the logfile. More... | |
void | close () |
Finalizes and closes the log file. More... | |
Static Public Member Functions | |
static void | writeToAllLogFiles (const std::string &str) |
Method to write something to all currently open log files, useful when program aborts and a message should appear in all logs. More... | |
Helper class to write to a log file.
void LogFile::close | ( | ) |
Finalizes and closes the log file.
|
inline |
Returns the filename from the 'open' call.
bool_t LogFile::open | ( | const std::string & | fileName | ) |
Opens the specified file for writing.
void LogFile::print | ( | const char * | format, |
... | |||
) |
Writes the specified parameters (similar to printf) to the logfile, automatically appending a newline character (\n).
void LogFile::printNoNewLine | ( | const char * | format, |
... | |||
) |
Writes the specified parameters (similar to printf) to the logfile.
|
static |
Method to write something to all currently open log files, useful when program aborts and a message should appear in all logs.