26#include "pism/util/Logger.hh"
27#include "pism/util/pism_options.hh"
28#include "pism/util/error_handling.hh"
58 va_start(argp, format);
59 vsnprintf(buffer,
sizeof(buffer), format, argp);
74 PetscErrorCode ierr = PetscFPrintf(
m_impl->
com, PETSC_STDOUT,
"%s", buffer);
82 va_start(argp, format);
83 vsnprintf(buffer,
sizeof(buffer), format, argp);
90 PetscErrorCode ierr = PetscFPrintf(
m_impl->
com, stderr,
"%s", buffer);
void disable() const
Silence the logger.
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)
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.
virtual void error_impl(const char buffer[]) const
virtual void message_impl(const char buffer[]) const
Do the hard work. Override this in a derived class to customize.
StringLogger(MPI_Comm com, int threshold)
#define PISM_CHK(errcode, name)