21 bool open(
const std::string &fileName);
27 void print(
const char *format, ...);
40 std::string m_fileName;
42 static std::vector<LogFile *> s_allLogFiles;
bool open(const std::string &fileName)
Opens the specified file for writing.
Definition: logfile.cpp:32
Base class which allows an error message to be set.
Definition: errorbase.h:49
Helper class to write to a log file.
Definition: logfile.h:14
void close()
Finalizes and closes the log file.
Definition: logfile.cpp:61
static void writeToAllLogFiles(const std::string &str)
Method to write something to all currently open log files, useful when program aborts and a message s...
Definition: logfile.cpp:98
std::string getFileName() const
Returns the filename from the 'open' call.
Definition: logfile.h:24
void print(const char *format,...)
Writes the specified parameters (similar to printf) to the logfile, automatically appending a newline...
Definition: logfile.cpp:70
void printNoNewLine(const char *format,...)
Writes the specified parameters (similar to printf) to the logfile.
Definition: logfile.cpp:84