32 #ifndef SIMULATION_LOGGER_H
33 #define SIMULATION_LOGGER_H
48 this->initialize(file_name, cout_write);
51 void initialize(
const std::string& file_name,
bool cout_write=
false)
53 log_file_.open(file_name);
54 if (log_file_.fail()) {
55 throw std::runtime_error(
"[SimulationLogger] Unable to open the file '" + file_name +
"' for writing.");
58 cout_write_ = cout_write;
59 file_name_ = file_name;
69 if (file_name_ ==
"") {
84 if (file_name_ ==
"") {
98 bool cout_write_ =
false;
99 std::string file_name_;
100 std::ofstream log_file_;
The SimulationLogger class is used to write information to a text file and optionally to cout.
Definition: SimulationLogger.h:41