20 class CommandLineLogger;
115 std::string
addSeparators(std::string::size_type spaces, std::string message)
const;
133 std::string messageType,
134 long int timestampNanoseconds,
int rank,
int threadId,
const std::string& trace,
const std::string& message
191 void debug(
long int timestampNanoseconds,
int rank,
int threadId,
const std::string& trace,
const std::string& message);
192 void info(
long int timestampNanoseconds,
int rank,
int threadId,
const std::string& trace,
const std::string& message);
203 void warning(
long int timestampNanoseconds,
int rank,
int threadId,
const std::string& trace,
const std::string& message);
214 void error(
long int timestampNanoseconds,
int rank,
int threadId,
const std::string& trace,
const std::string& message);
216 void traceIn(
long int timestampNanoseconds,
int rank,
int threadId,
const std::string& trace,
const std::string& message);
217 void traceOut(
long int timestampNanoseconds,
int rank,
int threadId,
const std::string& trace,
const std::string& message);
245 void indent(
bool indent,
const std::string& trace,
const std::string& message );
263 const std::string& columnSeparator,
265 bool logTimeStampHumanReadable,
270 const std::string& outputLogFileName
std::string _logColumnSeparator
Test for the column separator of a string output.
std::stack< std::string > _indentTraces
bool getLogTrace() const
Is public as some analysis frameworks check explicitly whether these features are switched on.
bool getLogTimeStamp() const
Is public as some analysis frameworks check explicitly whether these features are switched on.
void setLogThreadName(bool value=true)
static const std::string::size_type NumberOfIndentSpaces
std::string constructMessageString(std::string messageType, long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
Construct message string.
void reopenOutputStream()
void closeOutputStreamAndReopenNewOne()
The command line logger can pipe debug data into an output file instead of piping everything to the t...
tarch::multicore::BooleanSemaphore _semaphore
static const std::string::size_type NumberOfStandardColumnSpaces
void setLogTimeStampHumanReadable(bool value=true)
void setLogFormat(const std::string &columnSeparator, bool logTimeStamp, bool logTimeStampHumanReadable, bool logMachineName, bool logThreadName, bool logMessageType, bool logTrace, const std::string &outputLogFileName)
std::ostream * _outputStream
void setLogMachineName(bool value=true)
void setLogColumnSeparator(const std::string &separator=" ")
bool getLogMessageType() const
static CommandLineLogger & getInstance()
void setLogTrace(bool value=true)
void indent(bool indent, const std::string &trace, const std::string &message)
Tells the logger to increment/decrement the indent.
static std::string getTimeStampHumanReadable(long int timestampNanoseconds)
static const int DigitsInFilenamesIterationNumer
void setQuitOnError(bool value)
static const std::string::size_type NumberOfTraceColumnSpaces
The trace column is not formatted using only tabulators, but it uses spaces to create a unique column...
void traceOut(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
std::string getLogColumnSeparator() const
void configureOutputStreams()
Configures the output streams.
static CommandLineLogger _singleton
CommandLineLogger & operator=(const CommandLineLogger &)
Declared private since assignment does not make sense for an output class (output information mismatc...
void debug(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
void error(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
Write Error.
std::string _outputFileName
bool _logTimeStampHumanReadable
bool getLogMachineName() const
Is public as some analysis frameworks check explicitly whether these features are switched on.
void setOutputFile(const std::string &outputLogFileName)
Is redundant, as you could use setLogFormat() instead.
bool _hasWrittenToOuputStream
void traceIn(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
void setLogMessageType(bool value=true)
bool getLogTimeStampHumanReadable() const
void info(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
void setLogTimeStamp(bool value=true)
static std::string::size_type _indent
Indent is supported only in debug mode.
std::string addSeparators(std::string::size_type spaces, std::string message) const
Takes the message and adds spaces such that the entries are aligned like in a table.
void warning(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
Write Warning.
bool getLogThreadName() const
Is public as some analysis frameworks check explicitly whether these features are switched on.
CommandLineLogger()
It's a singleton.
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.