31 #ifndef SIMULATION_LOGGER_H
32 #define SIMULATION_LOGGER_H
47 this->initialize(file_name, cout_write);
50 void initialize(
const std::string& file_name,
bool cout_write=
false)
52 log_file_.open(file_name);
53 if (log_file_.fail()) {
54 throw std::runtime_error(
"[SimulationLogger] Unable to open the file '" + file_name +
"' for writing.");
57 cout_write_ = cout_write;
58 file_name_ = file_name;
68 if (file_name_ ==
"") {
83 if (file_name_ ==
"") {
97 bool cout_write_ =
false;
98 std::string file_name_;
99 std::ofstream log_file_;
The SimulationLogger class is used to write information to a text file and optionally to cout.
Definition: SimulationLogger.h:40