LogFile

LogFile provides a simple class that wraps a log file.

Interface

  LogFile(std::string log_file_name)  
Contructor.
  bool open(std::string log_file_name)  
Returns true if the log is successfully opened for output.
  bool ok() const  
Check that the log is open and ready for new messages.
  bool header()  
Add the header to a new message to the log. Extra text can be added with operator <<. Returns a call to ok().
  template <typename T>
  Log &operator <<(const T partial_msg)  
Stream a partial message of any type into the log.
  template <typename T>
  bool operator ()(const T msg)  
Stream a complete message into the log. A header at the start and a newline at the end are added. Returns a call to ok().