Class LogFile¶
- Defined in File LogFile.h
Class Documentation¶
-
class
LogFile
¶ Contains routines for writing to log files.
Public Functions
-
LogFile
()¶ Default constructor.
-
LogFile
(string file_name_in)¶ Constructor taking location of a log file.
- Parameters
file_name_in
: the path to the log file to open
-
~LogFile
()¶ Default destructor, including writing closure out to log file.
-
void
init
(string file_name_in)¶ Initialises the LogFile by creating a file at the specified location.
- Parameters
file_name_in
: the file to create
-
void
write
(const int &level, string message)¶ Writes the message out to the logfile at the specified logging level.
- Parameters
level
: the level of logging severitymessage
: the message to write out
-
void
write
(const int &level, stringstream &message)¶ Writes the message out to the logfile at the specified logging level.
- Parameters
level
: the level of logging severitymessage
: the message to write out
-