AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
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...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.6.0/src/axom/slic/core/SimpleLogger.hpp>
Public Member Functions | |
SimpleLogger () | |
Constructor initializes slic logging environment. More... | |
~SimpleLogger () | |
Destructor finalizes slic loging environment. More... | |
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.
To use, create an instance of of this class before tests are run. This initializes the slic logger. When the object is destroyed (e.g., goes out of scope), the slic logger is finalized. For example, when using gtest, a simple main program can be used in each test source file to do this:
* * int main(int argc, char* argv[]) * { * int result = 0; * * ::testing::InitGoogleTest(&argc, argv); * * // create & initialize test logger, finalized when exiting main scope * axom::slic::SimpleLogger logger; * * result = RUN_ALL_TESTS(); * * return 0; * } * *
|
inline |
Constructor initializes slic logging environment.
References axom::slic::addStreamToMsgLevel(), axom::slic::message::Debug, axom::slic::message::Error, axom::slic::message::Info, axom::slic::initialize(), axom::slic::setLoggingMsgLevel(), and axom::slic::message::Warning.
|
inline |
Destructor finalizes slic loging environment.
References axom::slic::finalize().