|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
A concrete instance of LogStream that utilizes Lumberjack to filter and pass messages between MPI nodes. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/main/src/axom/slic/streams/LumberjackStream.hpp>

Public Member Functions | |
| LumberjackStream (std::ostream *stream, MPI_Comm comm, int ranksLimit) | |
| Constructs a LumberjackStream instance with the given stream, MPI communicator, and rank limit. More... | |
| LumberjackStream (std::ostream *stream, MPI_Comm comm, int ranksLimit, const std::string &format) | |
| Constructs a LumberjackStream instance with the given stream, MPI communicator, rank limit, and message formatting. More... | |
| LumberjackStream (std::ostream *stream, axom::lumberjack::Lumberjack *lj) | |
| Constructs a LumberjackStream instance with the given stream and Lumberjack communicator. More... | |
| LumberjackStream (std::ostream *stream, axom::lumberjack::Lumberjack *lj, const std::string &format) | |
| Constructs a LumberjackStream instance with the given stream Lumberjack communicator, and message formatting. More... | |
| LumberjackStream (std::string stream, MPI_Comm comm, int ranksLimit) | |
| Constructs a LumberjackStream instance specified by the given string, MPI communicator, and rank limit. The string input determines the stream as follows: More... | |
| LumberjackStream (std::string stream, MPI_Comm comm, int ranksLimit, const std::string &format) | |
| Constructs a LumberjackStream instance specified by the given string, MPI communicator, rank limit, and message formatting. The string input determines the stream as follows: More... | |
| LumberjackStream (std::string stream, axom::lumberjack::Lumberjack *lj) | |
| Constructs a LumberjackStream instance specified by the given string and Lumberjack communicator. The string input determines the stream as follows: More... | |
| LumberjackStream (std::string stream, axom::lumberjack::Lumberjack *lj, const std::string &format) | |
| Constructs a LumberjackStream instance specified by the given string, Lumberjack communicator, and message formatting. The string input determines the stream as follows: More... | |
| virtual | ~LumberjackStream () |
| virtual void | append (message::Level msgLevel, const std::string &message, const std::string &tagName, const std::string &fileName, int line, bool filter_duplicates, bool tag_stream_only) override |
| Appends the given message to the stream. More... | |
| virtual void | outputLocal () override |
| Pushes the messages from the current rank directly to the console (non-collectively). More... | |
| virtual void | flush () override |
| Pushes all messages to the output node according to Lumberjack's Communication scheme. Then writes it to the console. More... | |
| virtual void | push () override |
| Pushes all messages once to their parent node according to Lumberjack's Communication scheme. More... | |
| void | write (bool local=false) |
| Writes the messages to the given stream that are at the output node or at the current node if local is true. More... | |
| virtual bool | hasPendingMessages () override |
| Tests whether there are any pending messages that need to be flushed. More... | |
| virtual bool | isUsingMPI () override |
| Tests whether this class relies on MPI. More... | |
| virtual MPI_Comm | comm () override |
| Get the communicator. More... | |
| void | setFormatString (const std::string &format) |
| Sets the format string. More... | |
Protected Member Functions | |
| void | initializeLumberjack (MPI_Comm comm, int ranksLimit) |
| void | finalizeLumberjack () |
| std::string | getFormatedMessage (const std::string &msgLevel, const std::string &message, const std::string &tagName, const std::string &rank, const std::string &rank_count, const std::string &fileName, int line) |
| Get the communicator. More... | |
| std::string | getTimeStamp () |
| Returns a time-stamp. More... | |
Protected Attributes | |
Protected Members | |
| axom::lumberjack::Lumberjack * | m_lj |
| axom::lumberjack::Communicator * | m_ljComm |
| bool | m_isLJOwnedBySLIC |
| bool | m_isOstreamOwnedBySLIC |
| std::ostream * | m_stream |
| std::string | m_file_name |
| bool | m_opened |
A concrete instance of LogStream that utilizes Lumberjack to filter and pass messages between MPI nodes.
| axom::slic::LumberjackStream::LumberjackStream | ( | std::ostream * | stream, |
| MPI_Comm | comm, | ||
| int | ranksLimit | ||
| ) |
Constructs a LumberjackStream instance with the given stream, MPI communicator, and rank limit.
| [in] | stream | pointer to a user-supplied ostream instance. |
| [in] | comm | MPI communicator |
| [in] | ranksLimit | limit on how many ranks are individually tracked per message |
| axom::slic::LumberjackStream::LumberjackStream | ( | std::ostream * | stream, |
| MPI_Comm | comm, | ||
| int | ranksLimit, | ||
| const std::string & | format | ||
| ) |
Constructs a LumberjackStream instance with the given stream, MPI communicator, rank limit, and message formatting.
| [in] | stream | pointer to a user-supplied ostream instance. |
| [in] | comm | MPI communicator |
| [in] | ranksLimit | limit on how many ranks are individually tracked per message |
| [in] | format | the format string. |
| axom::slic::LumberjackStream::LumberjackStream | ( | std::ostream * | stream, |
| axom::lumberjack::Lumberjack * | lj | ||
| ) |
Constructs a LumberjackStream instance with the given stream and Lumberjack communicator.
| [in] | stream | pointer to a user-supplied ostream instance. |
| [in] | lj | Lumberjack communicator |
| axom::slic::LumberjackStream::LumberjackStream | ( | std::ostream * | stream, |
| axom::lumberjack::Lumberjack * | lj, | ||
| const std::string & | format | ||
| ) |
Constructs a LumberjackStream instance with the given stream Lumberjack communicator, and message formatting.
| [in] | stream | pointer to a user-supplied ostream instance. |
| [in] | lj | Lumberjack communicator |
| [in] | format | the format string. |
| axom::slic::LumberjackStream::LumberjackStream | ( | std::string | stream, |
| MPI_Comm | comm, | ||
| int | ranksLimit | ||
| ) |
Constructs a LumberjackStream instance specified by the given string, MPI communicator, and rank limit. The string input determines the stream as follows:
| [in] | stream | the string to control type of stream created |
| [in] | comm | MPI communicator |
| [in] | ranksLimit | limit on how many ranks are individually tracked per message |
| axom::slic::LumberjackStream::LumberjackStream | ( | std::string | stream, |
| MPI_Comm | comm, | ||
| int | ranksLimit, | ||
| const std::string & | format | ||
| ) |
Constructs a LumberjackStream instance specified by the given string, MPI communicator, rank limit, and message formatting. The string input determines the stream as follows:
| [in] | stream | the string to control type of stream created |
| [in] | comm | MPI communicator |
| [in] | ranksLimit | limit on how many ranks are individually tracked per message |
| [in] | format | the format string. |
| axom::slic::LumberjackStream::LumberjackStream | ( | std::string | stream, |
| axom::lumberjack::Lumberjack * | lj | ||
| ) |
Constructs a LumberjackStream instance specified by the given string and Lumberjack communicator. The string input determines the stream as follows:
| [in] | stream | the string to control type of stream created |
| [in] | lj | Lumberjack communicator |
| axom::slic::LumberjackStream::LumberjackStream | ( | std::string | stream, |
| axom::lumberjack::Lumberjack * | lj, | ||
| const std::string & | format | ||
| ) |
Constructs a LumberjackStream instance specified by the given string, Lumberjack communicator, and message formatting. The string input determines the stream as follows:
| [in] | stream | the string to control type of stream created |
| [in] | lj | Lumberjack communicator |
| [in] | format | the format string. |
|
virtual |
|
overridevirtual |
Appends the given message to the stream.
| [in] | msgLevel | the level of the message. |
| [in] | message | the user-supplied message. |
| [in] | tagName | user-supplied tag to associate with the given message. |
| [in] | fileName | the file where this message is appended |
| [in] | line | the line within the file at which the message is appended. |
| [in] | filter_duplicates | optional parameter that indicates whether duplicate messages resulting from running in parallel will be filtered out. /param [in] tag_stream_only optional parameter that indicates whether the message will go only to streams bound to tagName. |
Implements axom::slic::LogStream.
|
overridevirtual |
Pushes the messages from the current rank directly to the console (non-collectively).
Reimplemented from axom::slic::LogStream.
|
overridevirtual |
Pushes all messages to the output node according to Lumberjack's Communication scheme. Then writes it to the console.
Reimplemented from axom::slic::LogStream.
|
overridevirtual |
Pushes all messages once to their parent node according to Lumberjack's Communication scheme.
Reimplemented from axom::slic::LogStream.
| void axom::slic::LumberjackStream::write | ( | bool | local = false | ) |
Writes the messages to the given stream that are at the output node or at the current node if local is true.
param [in] local If true, writes out messages at the current node. If false, only writes out messages at the output node. Default is false.
It does not flush any messages and not all messages are guaranteed to be at the output node.
|
overridevirtual |
Tests whether there are any pending messages that need to be flushed.
Reimplemented from axom::slic::LogStream.
|
overridevirtual |
Tests whether this class relies on MPI.
Reimplemented from axom::slic::LogStream.
|
overridevirtual |
Get the communicator.
|
protected |
|
protected |
|
inlineinherited |
Sets the format string.
| format | a format string |
An example illustrating how an application can setup the format string is shown below:
|
protectedinherited |
Get the communicator.
Returns the formatted message as a single string.
| [in] | msgLevel | the level of the given message. |
| [in] | message | the user-supplied message. |
| [in] | tagName | user-supplied tag, may be MSG_IGNORE_TAG |
| [in] | fileName | filename where this message is logged, may be MSG_IGNORE_FILE to ignore this field. |
| [in] | rank | The MPI rank(s) that emitted this message |
| [in] | rank_count | the number of MPI ranks that emitted this message |
| [in] | line | the line number within the file where the message is logged. Likewise, may be set to MSG_IGNORE_LINE to ignore this field. |
|
protectedinherited |
Returns a time-stamp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |