|
Peano
|
Chrome Trace File Logger. More...
#include <ChromeTraceFileLogger.h>

Public Member Functions | |
| ~ChromeTraceFileLogger () | |
| void | debug (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
| void | info (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
| void | warning (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
| void | error (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
| void | traceIn (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
| void | traceOut (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
| void | indent (bool indent, const std::string &trace, const std::string &message) |
| Tells the logger to increment/decrement the indent. | |
| void | setOutputFile (const std::string &outputLogFileName) |
| Is redundant, as you could use setLogFormat() instead. | |
| void | setQuitOnError (bool value) |
| void | close () |
Static Public Member Functions | |
| static ChromeTraceFileLogger & | getInstance () |
Private Member Functions | |
| void | nextEntry () |
| ChromeTraceFileLogger & | operator= (const ChromeTraceFileLogger &) |
| Declared private since assignment does not make sense for an output class (output information mismatch). | |
| ChromeTraceFileLogger (const ChromeTraceFileLogger &) | |
| Declared private since copying does not make sense for an output class (output information mismatch). | |
| std::string | addSeparators (std::string message) const |
| Ensures each column has same length. | |
| std::string | constructMessageString (std::string messageType, long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
| Construct message string for output to terminal. | |
| std::string | constructEventEntryInTraceFile (std::string messageType, long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
| void | configureOutputStreams () |
| Configures the output streams. | |
| ChromeTraceFileLogger () | |
| It's a singleton. | |
Private Attributes | |
| tarch::multicore::BooleanSemaphore | _semaphore |
| std::ostream * | _outputStream |
| Test for the column separator of a string output. | |
| bool | _quitOnError |
| bool | _hasWrittenEntry |
Static Private Attributes | |
| static Log | _log |
| static ChromeTraceFileLogger | _singleton |
Chrome Trace File Logger.
To visualise the output files, either use Google's Chrome or the trace file viewer from The Chromium Projects. In Ubuntu, simply install the Chromium web browser. Once launched, type in chrome://tracing/ and press enter. After that, you can load the trace file.
Definition at line 34 of file ChromeTraceFileLogger.h.
|
private |
Declared private since copying does not make sense for an output class (output information mismatch).
|
private |
It's a singleton.
| tarch::logging::ChromeTraceFileLogger::~ChromeTraceFileLogger | ( | ) |
|
private |
Ensures each column has same length.
| void tarch::logging::ChromeTraceFileLogger::close | ( | ) |
|
private |
Configures the output streams.
|
private |
|
private |
Construct message string for output to terminal.
I pipe data to the terminal for error messages, warnings and infos.
| void tarch::logging::ChromeTraceFileLogger::debug | ( | long int | timestampMS, |
| int | rank, | ||
| int | threadId, | ||
| const std::string & | trace, | ||
| const std::string & | message ) |
| void tarch::logging::ChromeTraceFileLogger::error | ( | long int | timestampMS, |
| int | rank, | ||
| int | threadId, | ||
| const std::string & | trace, | ||
| const std::string & | message ) |
|
static |
| void tarch::logging::ChromeTraceFileLogger::indent | ( | bool | indent, |
| const std::string & | trace, | ||
| const std::string & | message ) |
Tells the logger to increment/decrement the indent.
Implemented for compatibility reasons
| void tarch::logging::ChromeTraceFileLogger::info | ( | long int | timestampMS, |
| int | rank, | ||
| int | threadId, | ||
| const std::string & | trace, | ||
| const std::string & | message ) |
|
private |
|
private |
Declared private since assignment does not make sense for an output class (output information mismatch).
| void tarch::logging::ChromeTraceFileLogger::setOutputFile | ( | const std::string & | outputLogFileName | ) |
Is redundant, as you could use setLogFormat() instead.
However, it is tedious to specify all of these parameters if the only thing you want is to establish an output file.
| void tarch::logging::ChromeTraceFileLogger::setQuitOnError | ( | bool | value | ) |
| void tarch::logging::ChromeTraceFileLogger::traceIn | ( | long int | timestampMS, |
| int | rank, | ||
| int | threadId, | ||
| const std::string & | trace, | ||
| const std::string & | message ) |
| void tarch::logging::ChromeTraceFileLogger::traceOut | ( | long int | timestampMS, |
| int | rank, | ||
| int | threadId, | ||
| const std::string & | trace, | ||
| const std::string & | message ) |
| void tarch::logging::ChromeTraceFileLogger::warning | ( | long int | timestampMS, |
| int | rank, | ||
| int | threadId, | ||
| const std::string & | trace, | ||
| const std::string & | message ) |
|
private |
Definition at line 47 of file ChromeTraceFileLogger.h.
|
staticprivate |
Definition at line 36 of file ChromeTraceFileLogger.h.
|
private |
Test for the column separator of a string output.
Definition at line 45 of file ChromeTraceFileLogger.h.
|
private |
Definition at line 46 of file ChromeTraceFileLogger.h.
|
private |
Definition at line 40 of file ChromeTraceFileLogger.h.
|
staticprivate |
Definition at line 38 of file ChromeTraceFileLogger.h.