AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Holds information about messages and where they came from. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/lumberjack/Message.hpp>
Public Member Functions | |
Message () | |
Basic constructor where everything defaults to nothing. More... | |
Message (const std::string &text, int rank, const std::string &fileName, int lineNumber, int level, const std::string &tag) | |
Constructor where you can specify all values for a Message that originated from a specific rank. More... | |
Message (const std::string &text, const std::vector< int > &ranks, int count, int ranksLimit, const std::string &fileName, int lineNumber, int level, const std::string &tag) | |
Constructor where you can specify all values for a Message that originated from a multiple ranks. More... | |
std::string | text () const |
Returns the text of the Message. More... | |
std::vector< int > | ranks () const |
Returns the vector of the ranks where this Message originated. More... | |
int | count () const |
Returns the total count of this Message. More... | |
std::string | stringOfRanks (std::string delimiter=",") const |
Returns a string of ranks delimited by ',' unless otherwise specified. More... | |
std::string | fileName () const |
Returns the file name of where this Message originated. More... | |
int | lineNumber () const |
Returns the line number of where this Message originated. More... | |
int | level () const |
Returns the level of the severity of the Message. More... | |
std::string | tag () const |
Returns the tag of where the Message originated. More... | |
void | text (const std::string &newText) |
Sets a new text for this Message. More... | |
void | fileName (const std::string &newFileName) |
Sets a new file name for this Message. More... | |
void | lineNumber (int newLineNumber) |
Sets a new line number for this Message. More... | |
void | level (int newLevel) |
Sets a new severity level for this Message. More... | |
void | tag (const std::string &newTag) |
Sets a new tag of where the Message originated. More... | |
void | addRank (int newRank, int ranksLimit) |
Adds a rank to this Message. More... | |
void | addRanks (const std::vector< int > &newRanks, int count, int ranksLimit) |
Adds multiple ranks to this Message. count tracks how many times this message has occurred since duplicates are being filtered. More... | |
std::string | pack () |
Returns a string of all information about this Message packed into a string. More... | |
void | unpack (const std::string &packedMessage, int ranksLimit) |
Overrides the information in this Message with the given packed string. More... | |
Holds information about messages and where they came from.
This class holds all the information about an individual message and where it came from, such as rank, file name, and line number.
|
inline |
Basic constructor where everything defaults to nothing.
|
inline |
Constructor where you can specify all values for a Message that originated from a specific rank.
[in] | text | Actual text of the Message. |
[in] | rank | The rank where the Message originated. |
[in] | fileName | The file name where the Message originated. |
[in] | lineNumber | The line number where the Message originated. |
[in] | level | The level of the severity of the Message. |
[in] | tag | The tag of where the Message originated. |
|
inline |
Constructor where you can specify all values for a Message that originated from a multiple ranks.
[in] | text | Actual text of the Message. |
[in] | ranks | The rank where the Message originated. |
[in] | count | Total number of instances of this Message. |
[in] | ranksLimit | Limit on how many ranks are individually tracked per Message. |
[in] | fileName | The file name where the Message originated. |
[in] | lineNumber | The line number where the Message originated. |
[in] | level | The level of the severity of the Message. |
[in] | tag | The tag of where the Message originated. |
References addRanks(), count(), and ranks().
std::string axom::lumberjack::Message::text | ( | ) | const |
Returns the text of the Message.
std::vector<int> axom::lumberjack::Message::ranks | ( | ) | const |
Returns the vector of the ranks where this Message originated.
int axom::lumberjack::Message::count | ( | ) | const |
Returns the total count of this Message.
std::string axom::lumberjack::Message::stringOfRanks | ( | std::string | delimiter = "," | ) | const |
Returns a string of ranks delimited by ',' unless otherwise specified.
[in] | delimiter | The delimiter used to separate the ranks in returned string. |
std::string axom::lumberjack::Message::fileName | ( | ) | const |
Returns the file name of where this Message originated.
int axom::lumberjack::Message::lineNumber | ( | ) | const |
Returns the line number of where this Message originated.
int axom::lumberjack::Message::level | ( | ) | const |
Returns the level of the severity of the Message.
std::string axom::lumberjack::Message::tag | ( | ) | const |
Returns the tag of where the Message originated.
void axom::lumberjack::Message::text | ( | const std::string & | newText | ) |
void axom::lumberjack::Message::fileName | ( | const std::string & | newFileName | ) |
void axom::lumberjack::Message::lineNumber | ( | int | newLineNumber | ) |
Sets a new line number for this Message.
[in] | newLineNumber | The new line number to be set for this message. |
void axom::lumberjack::Message::level | ( | int | newLevel | ) |
void axom::lumberjack::Message::tag | ( | const std::string & | newTag | ) |
void axom::lumberjack::Message::addRank | ( | int | newRank, |
int | ranksLimit | ||
) |
void axom::lumberjack::Message::addRanks | ( | const std::vector< int > & | newRanks, |
int | count, | ||
int | ranksLimit | ||
) |
Adds multiple ranks to this Message. count tracks how many times this message has occurred since duplicates are being filtered.
[in] | newRanks | The new ranks to be added. |
[in] | count | Count to add to Message::count |
[in] | ranksLimit | Limits how many ranks are tracked per Message. |
std::string axom::lumberjack::Message::pack | ( | ) |
void axom::lumberjack::Message::unpack | ( | const std::string & | packedMessage, |
int | ranksLimit | ||
) |