AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Namespaces | |
detail | |
inherit | |
Classes | |
struct | debug |
class | GenericOutputStream |
Concrete instance of LogStream, which implements functionality for logging messages to a C++ ostream object, e.g., std::cout, std::cerr, a std::ofstream, std::ostringstream, etc. More... | |
class | Logger |
A singleton class for logging error, debug and warning messages. More... | |
class | LogStream |
Abstract base class defining the interface of all LogStreams. More... | |
class | LumberjackStream |
A concrete instance of LogStream that utilizes Lumberjack to filter and pass messages between MPI nodes. More... | |
class | SimpleLogger |
SimpleLogger is a simple wrapper around the initialization and finalize operations of the slic::Logger class that is helpful for unit tests and simple applications in axom. More... | |
class | SynchronizedStream |
A concrete instance of LogStream that dumps messages to a C++ std::ostream object. More... | |
Typedefs | |
using | AbortFunctionPtr = void(*)() |
Functions | |
void | initialize () |
Initializes the SLIC logging environment. More... | |
bool | isInitialized () |
Checks if the SLIC logging environment is initialized. More... | |
void | createLogger (const std::string &name, char imask=inherit::nothing) |
Creates a new logger associated with the given name. More... | |
bool | activateLogger (const std::string &name) |
Activates the logger associated with the given name. More... | |
std::string | getActiveLoggerName () |
Returns the name of the active logger. More... | |
void | setLoggingMsgLevel (message::Level level) |
Sets desired logging level. More... | |
message::Level | getLoggingMsgLevel () |
Gets the current logging level. More... | |
void | setAbortOnError (bool status) |
Toggles the abort behavior for errors on the current active logger. More... | |
void | enableAbortOnError () |
Enables aborts on error messages for the current active logger. More... | |
void | disableAbortOnError () |
Disables aborts on error messages for the current active logger. More... | |
bool | isAbortOnErrorsEnabled () |
Checks whether aborts on errors are enabled for the current logger. More... | |
void | setAbortOnWarning (bool status) |
Toggles the abort behavior for warnings on the current active logger. More... | |
void | enableAbortOnWarning () |
Enables aborts on warnings messages for the current active logger. More... | |
void | disableAbortOnWarning () |
Disables aborts on warnings messages for the current active logger. More... | |
bool | isAbortOnWarningsEnabled () |
Checks whether aborts on warnings are enabled for the current logger. More... | |
void | setAbortFunction (AbortFunctionPtr abort_func) |
Sets the function to call when program abort is requested. More... | |
void | addStreamToMsgLevel (LogStream *ls, message::Level level) |
Adds the given stream to the the given level. More... | |
void | addStreamToAllMsgLevels (LogStream *ls) |
Adds the given stream to all levels. More... | |
void | logMessage (message::Level level, const std::string &message, bool filter_duplicates=false) |
Logs the given message to all registered streams. More... | |
void | logMessage (message::Level level, const std::string &message, const std::string &tag, bool filter_duplicates=false) |
Logs the given message to all registered streams. More... | |
void | logMessage (message::Level level, const std::string &message, const std::string &fileName, int line, bool filter_duplicates=false) |
Logs the given message to all registered streams. More... | |
void | logMessage (message::Level level, const std::string &message, const std::string &tag, const std::string &fileName, int line, bool filter_duplicates=false) |
Logs the given message to all registered streams. More... | |
void | logErrorMessage (const std::string &message, const std::string &fileName, int line) |
Convenience method to log an error message. More... | |
void | logWarningMessage (const std::string &message, const std::string &fileName, int line) |
Convenience method to log warning messages. More... | |
void | flushStreams () |
Flushes all streams. More... | |
void | pushStreams () |
Pushes all streams. More... | |
void | finalize () |
Finalizes the slic logging environment. More... | |
std::string | stacktrace () |
Uses glibc's backtrace() functionality to return a stacktrace. More... | |
using axom::slic::AbortFunctionPtr = typedef void (*)() |
void axom::slic::initialize | ( | ) |
Initializes the SLIC logging environment.
Referenced by axom::Array< double >::Array(), axom::mint::MeshCoordinates::getCoordinateArray(), axom::mint::UnstructuredMesh< TOPO >::getFaceCellsArray(), axom::Array< double >::isInSidre(), axom::mint::ParticleMesh::isInSidre(), axom::mint::MeshCoordinates::shrink(), axom::slic::SimpleLogger::SimpleLogger(), and axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh().
bool axom::slic::isInitialized | ( | ) |
Checks if the SLIC logging environment is initialized.
void axom::slic::createLogger | ( | const std::string & | name, |
char | imask = inherit::nothing |
||
) |
Creates a new logger associated with the given name.
[in] | name | the name to associate with the new logger. |
[in] | imask | inheritance mask, indicates the log level streams that will be inherited from the "root" logger. By default, nothing is inherited. |
bool axom::slic::activateLogger | ( | const std::string & | name | ) |
Activates the logger associated with the given name.
[in] | name | the name of the logger to activate. |
std::string axom::slic::getActiveLoggerName | ( | ) |
Returns the name of the active logger.
void axom::slic::setLoggingMsgLevel | ( | message::Level | level | ) |
Sets desired logging level.
[in] | level | user-supplied level to log. |
Referenced by axom::slic::SimpleLogger::SimpleLogger().
message::Level axom::slic::getLoggingMsgLevel | ( | ) |
Gets the current logging level.
void axom::slic::setAbortOnError | ( | bool | status | ) |
Toggles the abort behavior for errors on the current active logger.
[in] | status | user-supplied flag. |
void axom::slic::enableAbortOnError | ( | ) |
Enables aborts on error messages for the current active logger.
void axom::slic::disableAbortOnError | ( | ) |
Disables aborts on error messages for the current active logger.
bool axom::slic::isAbortOnErrorsEnabled | ( | ) |
Checks whether aborts on errors are enabled for the current logger.
void axom::slic::setAbortOnWarning | ( | bool | status | ) |
Toggles the abort behavior for warnings on the current active logger.
[in] | status | user-supplied flag. |
void axom::slic::enableAbortOnWarning | ( | ) |
Enables aborts on warnings messages for the current active logger.
void axom::slic::disableAbortOnWarning | ( | ) |
Disables aborts on warnings messages for the current active logger.
bool axom::slic::isAbortOnWarningsEnabled | ( | ) |
Checks whether aborts on warnings are enabled for the current logger.
void axom::slic::setAbortFunction | ( | AbortFunctionPtr | abort_func | ) |
Sets the function to call when program abort is requested.
[in] | abort_func | The user-specified function to call |
void axom::slic::addStreamToMsgLevel | ( | LogStream * | ls, |
message::Level | level | ||
) |
Adds the given stream to the the given level.
[in] | ls | pointer to the log stream. |
[in] | level | the level to log. |
Referenced by axom::slic::SimpleLogger::SimpleLogger().
void axom::slic::addStreamToAllMsgLevels | ( | LogStream * | ls | ) |
Adds the given stream to all levels.
[in] | ls | pointer to the log stream. |
void axom::slic::logMessage | ( | message::Level | level, |
const std::string & | message, | ||
bool | filter_duplicates = false |
||
) |
Logs the given message to all registered streams.
[in] | level | the level of the message being logged. |
[in] | message | user-supplied message. |
[in] | filter_duplicates | optional parameter that indicates whether duplicate messages resulting from running in parallel will be filtered out. Default is false. |
void axom::slic::logMessage | ( | message::Level | level, |
const std::string & | message, | ||
const std::string & | tag, | ||
bool | filter_duplicates = false |
||
) |
Logs the given message to all registered streams.
[in] | level | the level of the message being logged. |
[in] | message | user-supplied message. |
[in] | tag | user-supplied associated with this message. |
[in] | filter_duplicates | optional parameter that indicates whether duplicate messages resulting from running in parallel will be filtered out. Default is false. |
void axom::slic::logMessage | ( | message::Level | level, |
const std::string & | message, | ||
const std::string & | fileName, | ||
int | line, | ||
bool | filter_duplicates = false |
||
) |
Logs the given message to all registered streams.
[in] | level | the level of the message being logged. |
[in] | message | user-supplied message. |
[in] | fileName | the name of the file this message is logged from. |
[in] | line | the line number within the file this message is logged. |
[in] | filter_duplicates | optional parameter that indicates whether duplicate messages resulting from running in parallel will be filtered out. Default is false. |
void axom::slic::logMessage | ( | message::Level | level, |
const std::string & | message, | ||
const std::string & | tag, | ||
const std::string & | fileName, | ||
int | line, | ||
bool | filter_duplicates = false |
||
) |
Logs the given message to all registered streams.
[in] | level | the level of the message being logged. |
[in] | message | user-supplied message. |
[in] | tag | user-supplied tag associated with the message. |
[in] | fileName | the name of the file this message is logged form. |
[in] | line | the line number within the file this message is logged. |
[in] | filter_duplicates | optional parameter that indicates whether duplicate messages resulting from running in parallel will be filtered out. Default is false. |
void axom::slic::logErrorMessage | ( | const std::string & | message, |
const std::string & | fileName, | ||
int | line | ||
) |
Convenience method to log an error message.
[in] | message | user-supplied message. |
[in] | fileName | the name of the file this message is logged from. |
[in] | line | the line number within the file that the message is logged. |
void axom::slic::logWarningMessage | ( | const std::string & | message, |
const std::string & | fileName, | ||
int | line | ||
) |
Convenience method to log warning messages.
[in] | message | user-supplied message. |
[in] | fileName | the name of the file this message is logged from. |
[in] | line | the line number within the file that the message is logged. |
void axom::slic::flushStreams | ( | ) |
Flushes all streams.
void axom::slic::pushStreams | ( | ) |
Pushes all streams.
void axom::slic::finalize | ( | ) |
Finalizes the slic logging environment.
Referenced by axom::slic::SimpleLogger::~SimpleLogger().
std::string axom::slic::stacktrace | ( | ) |
Uses glibc's backtrace() functionality to return a stacktrace.