42 Logger(MPI_Comm com,
int threshold);
45 typedef std::shared_ptr<Logger>
Ptr;
46 typedef std::shared_ptr<const Logger>
ConstPtr;
53 void message(
int threshold, const std::
string &text) const;
78 virtual
void error_impl(const
char buffer[]) const;
94 std::string get()
const;
97 virtual void error_impl(
const char buffer[])
const;
void disable() const
Silence the logger.
std::shared_ptr< const Logger > ConstPtr
void void set_threshold(int level)
Set verbosity threshold.
void message(int threshold, const char format[],...) const __attribute__((format(printf
Print a message to the log.
virtual void error_impl(const char buffer[]) const
Logger(MPI_Comm com, int threshold)
std::shared_ptr< Logger > Ptr
virtual void message_impl(const char buffer[]) const
Do the hard work. Override this in a derived class to customize.
void error(const char format[],...) const __attribute__((format(printf
Print an error message to the log.
int get_threshold() const
Get verbosity threshold.
void enable() const
(Re-)enable the logger.
A logger that accumulates messages and reports them as a string.
Logger::Ptr logger_from_options(MPI_Comm com)
std::string printf(const char *format,...)