|
hydrobricks
|
#include <Log.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| LogFile (const LogFile &)=delete | |
| LogFile & | operator= (const LogFile &)=delete |
| void | Open (const std::string &path) |
| void | Close () |
| bool | IsOpen () |
| void | Write (const std::string &line) |
A log file owned by one object (e.g. one model instance), so that several models living in the same process each keep their own log, whatever the order in which they are created, run and destroyed. Messages reach it through a LogScope.
| void LogFile::Close | ( | ) |
Flush and close the file.
| void LogFile::Open | ( | const std::string & | path | ) |
Open (and truncate) the file at the given path, closing any previous one.