50#ifndef ZOLTAN2_DEBUGMANAGER_HPP
51#define ZOLTAN2_DEBUGMANAGER_HPP
97 myOS_(static_cast<std::ostream *>(&debugOs)), fileOS_(&debugOs),
98 iPrint_(doPrinting) {}
109 myOS_(&debugOs), fileOS_(NULL), iPrint_(doPrinting) {}
137#ifndef Z2_OMIT_ALL_STATUS_MESSAGES
138 if (debugLevel <= debugLevel_ && iPrint_)
139 *myOS_ << myPID_ <<
": " << output << std::endl;
153#ifndef Z2_OMIT_ALL_STATUS_MESSAGES
154 if (debugLevel <= debugLevel_)
155 *myOS_ << myPID_ <<
": " << output << std::endl;
168#ifndef Z2_OMIT_ALL_STATUS_MESSAGES
169 if (debugLevel <= debugLevel_ && iPrint_)
170 *myOS_ << myPID_ <<
": " << output << std::endl;
183#ifndef Z2_OMIT_ALL_STATUS_MESSAGES
184 if (debugLevel <= debugLevel_)
185 *myOS_ <<
"PID =" << myPID_ <<
" " << output << std::endl;
194 std::ofstream *fileOS_;
Defines Parameter related enumerators, declares functions.
DebugManager contains the methods that perform output of debug and status messages.
void print(MessageOutputLevel debugLevel, const std::string &output)
Print a debug or status message, if this process is one of those that is supposed to be doing output.
DebugManager(int rank, bool doPrinting, std::ofstream &debugOs, MessageOutputLevel debugLevel)
Constructor for output to an ofstream.
virtual ~DebugManager()
Destructor.
void printInAllTasks(MessageOutputLevel debugLevel, const std::string &output)
Print a debug or status message regardless of whether this process is one of those that is supposed t...
MessageOutputLevel getDebugLevel() const
Return the highest level of message that will be printed.
void print(MessageOutputLevel debugLevel, const char *output)
The const char * versions of print functions are needed to avoid the expensive conversion to string.
std::ostream * getOStream() const
Return the output stream for debug/status messages.
DebugManager(int rank, bool doPrinting, std::ostream &debugOs, MessageOutputLevel debugLevel)
Constructor for output to an iostream.
void printInAllTasks(MessageOutputLevel debugLevel, const char *output)
The const char * versions of print functions are needed to avoid the expensive conversion to string.
Created by mbenlioglu on Aug 31, 2020.
MessageOutputLevel
The amount of debugging or status output to print.