11#ifndef UTILS_IO_LOGGER_H
12#define UTILS_IO_LOGGER_H
50 void log(std::ostringstream &oss,
bool screen_out =
false,
52 log(oss.str(), screen_out, printMpiRank);
66 void log(
const std::string &str,
bool screen_out =
false,
70 std::cout << str << std::flush;
Prints log to std::cout and also write to the file.
Logger(LoggerDeck *deck=nullptr)
Constructor.
std::ofstream d_logFile
Filestream for logging.
void log(std::ostringstream &oss, bool screen_out=false, int printMpiRank=print_default_mpi_rank)
Log the message.
LoggerDeck * d_deck_p
Pointer to logger deck.
void log(const std::string &str, bool screen_out=false, int printMpiRank=print_default_mpi_rank)
Log the message.
const int print_default_mpi_rank
Default mpi rank in printing information.
int mpiRank()
get rank (id) of this processor
Collection of methods useful in simulation.
Deck to store log parameters.
bool d_printFile
Print to file?
std::string d_filename
Filename to print log.
bool d_printScreen
Print to std::cout?