11#if UseLogService==ChromeTraceFileLogger
15#if UseLogService==NVTXLogger
19#if UseLogService==ITACLogger
23#if UseLogService==ITTLogger
27#if UseLogService==ScorePLogger
35#ifdef CompilerHasUTSName
36#include <sys/utsname.h>
46 _className( className ) {
96 UseLogService::getInstance().indent( indent, trace, message() );
100 std::ostringstream message;
102 #ifdef CompilerHasUTSName
103 utsname* utsdata =
new utsname();
107 message <<
"[" << utsdata->nodename <<
"]";
120 message <<
"rank:not-initialised-yet";
126 return message.str();
130 UseLogService::getInstance().close();
134 std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
135 long int result = std::chrono::duration_cast<std::chrono::nanoseconds>(now - _startupTime).count();
141 return _className +
"::" + methodName;
#define assertion1(expr, param)
static LogFilter & getInstance()
virtual ~Log()
Destructor.
std::chrono::system_clock::time_point _startupTime
void traceIn(const std::string &methodName, Message logMacroMessage)
static std::string getMachineInformation()
Writes information about the computer the output is written from.
std::string getTraceInformation(const std::string &methodName) const
long int getTimeStamp() const
Returns the time stamp in nanoseconds.
void error(const std::string &methodName, Message logMacroMessage)
Log an Error.
void debug(const std::string &methodName, Message logMacroMessage) const
Log Debug Information.
Log(const std::string &className)
Constructor.
std::function< std::string(void) > Message
We could make the logMacroMessage passed into a log statement a string.
void info(const std::string &methodName, Message logMacroMessage)
Log Information.
static void flushBeforeAssertion()
void warning(const std::string &methodName, Message logMacroMessage)
Log a Warning.
void traceOut(const std::string &methodName, Message logMacroMessage)
void indent(bool indent, const std::string &trace, Message logMacroMessage) const
Indent the Subsequent Messages.
static Rank & getInstance()
This operation returns the singleton instance.
int getRank() const
Return rank of this node.
static Core & getInstance()