|
hemocell
|
#include <logfile.h>
Public Member Functions | |
| Logfile () | |
| Logfile (std::fstream &logfile_) | |
| bool | open (const std::string &filename_) |
| void | close () |
| Close the log file and stop logging (called when HemoCell is destroyed). | |
Public Attributes | |
| std::fstream & | logfile |
| std::string | filename = "" |
| bool | mainProcess = false |
| True on the process that writes the log (MPI rank 0); set by HemoCell. | |
| std::ostringstream | pending |
| Messages logged on the main process before the log file was opened. | |
Log stream of HemoCell (hlog): writes to stdout and to the log file, on the main MPI process only.
The log file is opened by loadDirectories(), which for checkpointed runs happens only in loadCheckPoint(). Messages logged before that (setup parameters, warnings, errors before an exit) are printed immediately and kept in pending, which open() writes to the top of the file.
|
inline |
|
inline |
|
inline |
Close the log file and stop logging (called when HemoCell is destroyed).
|
inline |
Open the log file (if not open yet) and write the pending messages.
| std::string hemo::Logfile::filename = "" |
| std::fstream& hemo::Logfile::logfile |
| bool hemo::Logfile::mainProcess = false |
True on the process that writes the log (MPI rank 0); set by HemoCell.
| std::ostringstream hemo::Logfile::pending |
Messages logged on the main process before the log file was opened.