Miind
|
#include <libs/MPILib/include/utilities/Log.hpp>
Public Member Functions | |
Log ()=default | |
Log (const Log &)=delete | |
virtual | ~Log () |
Log & | operator= (const Log &)=delete |
std::ostringstream & | writeReport (LogLevel level=logINFO) |
Static Public Member Functions | |
static LogLevel | getReportingLevel () |
static std::shared_ptr< std::ostream > | getStream () |
static void | setReportingLevel (LogLevel level) |
static void | setStream (std::shared_ptr< std::ostream > pStream) |
Static Private Member Functions | |
static void | writeOutput (const std::string &msg) |
Private Attributes | |
std::ostringstream | _buffer |
Static Private Attributes | |
static std::shared_ptr< std::ostream > | _pStream |
static LogLevel | _reportingLevel = DEBUGLEVEL |
class for logging reports. The usage of this log class is described on page The Log utilities provided by miind
|
default |
default constructor
|
delete |
copy constructor deleted
|
virtual |
destructor which writes the message to the stream
Definition at line 128 of file Log.cpp.
References _buffer, and writeOutput().
|
static |
getter for the current report level
Definition at line 124 of file Log.cpp.
References _reportingLevel.
|
static |
The Stream it writes to the standard is std::cerr
Definition at line 83 of file Log.cpp.
References _pStream.
Referenced by writeOutput().
|
static |
setter for the report level
level | The new report level |
Definition at line 117 of file Log.cpp.
References _reportingLevel, LOG, MPILib::utilities::logINFO, and MPILib::utilities::anonymous_namespace{Log.cpp}::logLevelToString().
|
static |
Setter for the stream
pStream | The Stream the log class should print to. |
Definition at line 87 of file Log.cpp.
References _pStream.
Referenced by MPILib::MPINetwork< WeightValue, NodeDistribution >::initializeLogStream().
|
staticprivate |
writes the output to the stream
msg | The message written to the stream |
Definition at line 91 of file Log.cpp.
References getStream().
Referenced by ~Log().
takes the log message and stores it in the buffer
level | The level of the log message |
Definition at line 100 of file Log.cpp.
References _buffer, MPILib::utilities::MPIProxy_::getRank(), MPILib::utilities::MPIProxy_::getSize(), MPILib::utilities::anonymous_namespace{Log.cpp}::logLevelToString(), and MPILib::utilities::MPIProxy().
|
private |
The buffer for the log message
Definition at line 213 of file Log.hpp.
Referenced by writeReport(), and ~Log().
|
staticprivate |
pointer to the stream
Definition at line 209 of file Log.hpp.
Referenced by getStream(), and setStream().
|
staticprivate |
The current reporting level of the Log, all messages with a level below this level are printed the rest is ignored
The default log level is set to the compile flag DEBUGLEVEL.
Definition at line 204 of file Log.hpp.
Referenced by getReportingLevel(), and setReportingLevel().