GEOS
|
#include "common/GeosxConfig.hpp"
#include "common/GeosxMacros.hpp"
#include "common/format/Format.hpp"
#include "LvArray/src/Macros.hpp"
#include <stdexcept>
Go to the source code of this file.
Classes | |
struct | geos::InputError |
Exception class used to report errors in user input. More... | |
struct | geos::SimulationError |
Exception class used to report errors in user input. More... | |
struct | geos::BadTypeError |
Exception class used to report errors from type conversion. More... | |
class | geos::NotAnError |
Exception class used for special control flow. More... | |
Namespaces | |
geos | |
Macros | |
#define | GEOS_LOG(...) LVARRAY_LOG( __VA_ARGS__ ) |
Log a message on screen. More... | |
#define | GEOS_LOG_VAR(...) LVARRAY_LOG_VAR( __VA_ARGS__ ) |
Log an expression and its value on screen. More... | |
#define | GEOS_LOG_IF(EXP, msg) |
Conditionally log a message. More... | |
#define | GEOS_LOG_RANK_0_IF(EXP, msg) |
Conditionally log a message on screen on rank 0. More... | |
#define | GEOS_LOG_RANK_0_IF_NLR(EXP, msg) |
Conditionally log a message on screen on rank 0 without line breaking. More... | |
#define | GEOS_LOG_RANK_0(msg) GEOS_LOG_RANK_0_IF( true, msg ) |
Log a message on screen on rank 0. More... | |
#define | GEOS_LOG_RANK_IF(EXP, msg) |
Conditionally log a message to the rank output stream. More... | |
#define | GEOS_LOG_RANK(msg) GEOS_LOG_RANK_IF( true, msg ) |
Log a message to the rank output stream. More... | |
#define | GEOS_LOG_RANK_VAR(var) GEOS_LOG_RANK( #var " = " << var ) |
Log a variable/expression name and value on screen to the rank output stream. More... | |
#define | GEOS_ERROR_IF(EXP, msg) LVARRAY_ERROR_IF( EXP, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Conditionally raise a hard error and terminate the program. More... | |
#define | GEOS_THROW_IF(EXP, msg, TYPE) LVARRAY_THROW_IF( EXP, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Conditionally throw an exception. More... | |
#define | GEOS_ERROR(msg) GEOS_ERROR_IF( true, msg ) |
Raise a hard error and terminate the program. More... | |
#define | GEOS_THROW(msg, TYPE) GEOS_THROW_IF( true, msg, TYPE ) |
Throw an exception. More... | |
#define | GEOS_ASSERT_MSG(EXP, msg) LVARRAY_ASSERT_MSG( EXP, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Assert a condition in debug builds. More... | |
#define | GEOS_ASSERT(EXP) GEOS_ASSERT_MSG( EXP, "" ) |
Assert a condition in debug builds. More... | |
#define | GEOS_WARNING_IF(EXP, msg) LVARRAY_WARNING_IF( EXP, msg ) |
Conditionally report a warning. More... | |
#define | GEOS_WARNING(msg) LVARRAY_WARNING( msg ) |
Report a warning. More... | |
#define | GEOS_INFO_IF(EXP, msg) LVARRAY_INFO_IF( EXP, msg ) |
Conditionally log an info message. More... | |
#define | GEOS_INFO(msg) LVARRAY_INFO( msg ) |
Log an info message. More... | |
#define | GEOS_ERROR_IF_EQ_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_EQ_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if two values are equal. More... | |
#define | GEOS_THROW_IF_EQ_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_EQ_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Raise a hard error if two values are equal. More... | |
#define | GEOS_ERROR_IF_EQ(lhs, rhs) GEOS_ERROR_IF_EQ_MSG( lhs, rhs, "" ) |
Raise a hard error if two values are equal. More... | |
#define | GEOS_THROW_IF_EQ(lhs, rhs, TYPE) GEOS_THROW_IF_EQ_MSG( lhs, rhs, "", TYPE ) |
Raise a hard error if two values are equal. More... | |
#define | GEOS_ERROR_IF_NE_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_NE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if two values are not equal. More... | |
#define | GEOS_THROW_IF_NE_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_NE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if two values are not equal. More... | |
#define | GEOS_ERROR_IF_NE(lhs, rhs) GEOS_ERROR_IF_NE_MSG( lhs, rhs, "" ) |
Raise a hard error if two values are not equal. More... | |
#define | GEOS_THROW_IF_NE(lhs, rhs, TYPE) GEOS_THROW_IF_NE_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if two values are not equal. More... | |
#define | GEOS_ERROR_IF_GT_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_GT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if one value compares greater than the other. More... | |
#define | GEOS_THROW_IF_GT_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_GT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if one value compares greater than the other. More... | |
#define | GEOS_ERROR_IF_GT(lhs, rhs) GEOS_ERROR_IF_GT_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares greater than the other. More... | |
#define | GEOS_THROW_IF_GT(lhs, rhs, TYPE) GEOS_ERROR_IF_GT_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares greater than the other. More... | |
#define | GEOS_ERROR_IF_GE_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_GE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if one value compares greater than or equal to the other. More... | |
#define | GEOS_THROW_IF_GE_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_GE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if one value compares greater than or equal to the other. More... | |
#define | GEOS_ERROR_IF_GE(lhs, rhs) GEOS_ERROR_IF_GE_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares greater than or equal to the other. More... | |
#define | GEOS_THROW_IF_GE(lhs, rhs, TYPE) GEOS_ERROR_IF_GE_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares greater than or equal to the other. More... | |
#define | GEOS_ERROR_IF_LT_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_LT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if one value compares less than the other. More... | |
#define | GEOS_THROW_IF_LT_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_LT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if one value compares less than the other. More... | |
#define | GEOS_ERROR_IF_LT(lhs, rhs) GEOS_ERROR_IF_LT_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares less than the other. More... | |
#define | GEOS_THROW_IF_LT(lhs, rhs, TYPE) GEOS_ERROR_IF_LT_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares less than the other. More... | |
#define | GEOS_ERROR_IF_LE_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_LE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if one value compares less than or equal to the other. More... | |
#define | GEOS_THROW_IF_LE_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_LE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if one value compares less than or equal to the other. More... | |
#define | GEOS_ERROR_IF_LE(lhs, rhs) GEOS_ERROR_IF_LE_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares less than or equal to the other. More... | |
#define | GEOS_THROW_IF_LE(lhs, rhs, TYPE) GEOS_ERROR_IF_LE_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares less than or equal to the other. More... | |
#define | GEOS_ASSERT_EQ_MSG(lhs, rhs, msg) LVARRAY_ASSERT_EQ_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Assert that two values compare equal in debug builds. More... | |
#define | GEOS_ASSERT_EQ(lhs, rhs) GEOS_ASSERT_EQ_MSG( lhs, rhs, "" ) |
Assert that two values compare equal in debug builds. More... | |
#define | GEOS_ASSERT_NE_MSG(lhs, rhs, msg) LVARRAY_ASSERT_NE_MSG( lhs, rhs, msg ) |
Assert that two values compare not equal in debug builds. More... | |
#define | GEOS_ASSERT_NE(lhs, rhs) LVARRAY_ASSERT_NE( lhs, rhs ) |
Assert that two values compare not equal in debug builds. More... | |
#define | GEOS_ASSERT_GT_MSG(lhs, rhs, msg) LVARRAY_ASSERT_GT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Assert that one value compares greater than the other in debug builds. More... | |
#define | GEOS_ASSERT_GT(lhs, rhs) GEOS_ASSERT_GT_MSG( lhs, rhs, "" ) |
Assert that one value compares greater than the other in debug builds. More... | |
#define | GEOS_ASSERT_GE_MSG(lhs, rhs, msg) LVARRAY_ASSERT_GE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Assert that one value compares greater than or equal to the other in debug builds. More... | |
#define | GEOS_ASSERT_GE(lhs, rhs) GEOS_ASSERT_GE_MSG( lhs, rhs, "" ) |
Assert that one value compares greater than or equal to the other in debug builds. More... | |
#define | GEOS_LOG_LEVEL_FN(minLevel, fn) |
Macro used to turn on/off a function based on the log level. More... | |
#define | GEOS_LOG_LEVEL(minLevel, msg) GEOS_LOG_IF( this->getLogLevel() >= minLevel, msg ); |
Output messages based on current Group's log level. More... | |
#define | GEOS_LOG_LEVEL_RANK_0(minLevel, msg) GEOS_LOG_RANK_0_IF( this->getLogLevel() >= minLevel, msg ) |
Output messages (only on rank 0) based on current Group's log level. More... | |
#define | GEOS_LOG_LEVEL_BY_RANK(minLevel, msg) GEOS_LOG_RANK_IF( this->getLogLevel() >= minLevel, msg ) |
Output messages (with one line per rank) based on current Group's log level. More... | |
Functions | |
void | geos::logger::InitializeLogger (const std::string &rank_output_dir="") |
Initialize the logger in a serial build. More... | |
void | geos::logger::FinalizeLogger () |
Finalize the logger and close the rank streams. | |
#define GEOS_ASSERT | ( | EXP | ) | GEOS_ASSERT_MSG( EXP, "" ) |
Assert a condition in debug builds.
EXP | an expression that will be evaluated as a predicate |
Definition at line 177 of file Logger.hpp.
#define GEOS_ASSERT_EQ | ( | lhs, | |
rhs | |||
) | GEOS_ASSERT_EQ_MSG( lhs, rhs, "" ) |
Assert that two values compare equal in debug builds.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 410 of file Logger.hpp.
#define GEOS_ASSERT_EQ_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ASSERT_EQ_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Assert that two values compare equal in debug builds.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 403 of file Logger.hpp.
#define GEOS_ASSERT_GE | ( | lhs, | |
rhs | |||
) | GEOS_ASSERT_GE_MSG( lhs, rhs, "" ) |
Assert that one value compares greater than or equal to the other in debug builds.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 455 of file Logger.hpp.
#define GEOS_ASSERT_GE_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ASSERT_GE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Assert that one value compares greater than or equal to the other in debug builds.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 448 of file Logger.hpp.
#define GEOS_ASSERT_GT | ( | lhs, | |
rhs | |||
) | GEOS_ASSERT_GT_MSG( lhs, rhs, "" ) |
Assert that one value compares greater than the other in debug builds.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 440 of file Logger.hpp.
#define GEOS_ASSERT_GT_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ASSERT_GT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Assert that one value compares greater than the other in debug builds.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 433 of file Logger.hpp.
#define GEOS_ASSERT_MSG | ( | EXP, | |
msg | |||
) | LVARRAY_ASSERT_MSG( EXP, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Assert a condition in debug builds.
EXP | an expression that will be evaluated as a predicate |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 171 of file Logger.hpp.
#define GEOS_ASSERT_NE | ( | lhs, | |
rhs | |||
) | LVARRAY_ASSERT_NE( lhs, rhs ) |
Assert that two values compare not equal in debug builds.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 425 of file Logger.hpp.
#define GEOS_ASSERT_NE_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ASSERT_NE_MSG( lhs, rhs, msg ) |
Assert that two values compare not equal in debug builds.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 418 of file Logger.hpp.
#define GEOS_ERROR | ( | msg | ) | GEOS_ERROR_IF( true, msg ) |
Raise a hard error and terminate the program.
msg | a message to log (any expression that can be stream inserted) |
Definition at line 157 of file Logger.hpp.
#define GEOS_ERROR_IF | ( | EXP, | |
msg | |||
) | LVARRAY_ERROR_IF( EXP, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Conditionally raise a hard error and terminate the program.
EXP | an expression that will be evaluated as a predicate |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 142 of file Logger.hpp.
#define GEOS_ERROR_IF_EQ | ( | lhs, | |
rhs | |||
) | GEOS_ERROR_IF_EQ_MSG( lhs, rhs, "" ) |
Raise a hard error if two values are equal.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 227 of file Logger.hpp.
#define GEOS_ERROR_IF_EQ_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ERROR_IF_EQ_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if two values are equal.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 211 of file Logger.hpp.
#define GEOS_ERROR_IF_GE | ( | lhs, | |
rhs | |||
) | GEOS_ERROR_IF_GE_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares greater than or equal to the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 323 of file Logger.hpp.
#define GEOS_ERROR_IF_GE_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ERROR_IF_GE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if one value compares greater than or equal to the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 307 of file Logger.hpp.
#define GEOS_ERROR_IF_GT | ( | lhs, | |
rhs | |||
) | GEOS_ERROR_IF_GT_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares greater than the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 291 of file Logger.hpp.
#define GEOS_ERROR_IF_GT_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ERROR_IF_GT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if one value compares greater than the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 275 of file Logger.hpp.
#define GEOS_ERROR_IF_LE | ( | lhs, | |
rhs | |||
) | GEOS_ERROR_IF_LE_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares less than or equal to the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 387 of file Logger.hpp.
#define GEOS_ERROR_IF_LE_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ERROR_IF_LE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if one value compares less than or equal to the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 371 of file Logger.hpp.
#define GEOS_ERROR_IF_LT | ( | lhs, | |
rhs | |||
) | GEOS_ERROR_IF_LT_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares less than the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 355 of file Logger.hpp.
#define GEOS_ERROR_IF_LT_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ERROR_IF_LT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if one value compares less than the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 339 of file Logger.hpp.
#define GEOS_ERROR_IF_NE | ( | lhs, | |
rhs | |||
) | GEOS_ERROR_IF_NE_MSG( lhs, rhs, "" ) |
Raise a hard error if two values are not equal.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
Definition at line 259 of file Logger.hpp.
#define GEOS_ERROR_IF_NE_MSG | ( | lhs, | |
rhs, | |||
msg | |||
) | LVARRAY_ERROR_IF_NE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg ) |
Raise a hard error if two values are not equal.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 243 of file Logger.hpp.
#define GEOS_INFO | ( | msg | ) | LVARRAY_INFO( msg ) |
Log an info message.
msg | a message to log (any expression that can be stream inserted) |
Definition at line 203 of file Logger.hpp.
#define GEOS_INFO_IF | ( | EXP, | |
msg | |||
) | LVARRAY_INFO_IF( EXP, msg ) |
Conditionally log an info message.
EXP | an expression that will be evaluated as a predicate |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 197 of file Logger.hpp.
#define GEOS_LOG | ( | ... | ) | LVARRAY_LOG( __VA_ARGS__ ) |
Log a message on screen.
The expression to log must evaluate something that can be stream inserted.
Definition at line 40 of file Logger.hpp.
#define GEOS_LOG_IF | ( | EXP, | |
msg | |||
) |
Conditionally log a message.
EXP | an expression that will be evaluated as a predicate |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 57 of file Logger.hpp.
#define GEOS_LOG_LEVEL | ( | minLevel, | |
msg | |||
) | GEOS_LOG_IF( this->getLogLevel() >= minLevel, msg ); |
Output messages based on current Group's log level.
[in] | minLevel | minimum log level |
[in] | msg | a message to log (any expression that can be stream inserted) |
Definition at line 476 of file Logger.hpp.
#define GEOS_LOG_LEVEL_BY_RANK | ( | minLevel, | |
msg | |||
) | GEOS_LOG_RANK_IF( this->getLogLevel() >= minLevel, msg ) |
Output messages (with one line per rank) based on current Group's log level.
[in] | minLevel | minimum log level |
[in] | msg | a message to log (any expression that can be stream inserted) |
Definition at line 492 of file Logger.hpp.
#define GEOS_LOG_LEVEL_FN | ( | minLevel, | |
fn | |||
) |
Macro used to turn on/off a function based on the log level.
[in] | minLevel | Minimum log level |
[in] | fn | Function to filter |
Definition at line 462 of file Logger.hpp.
#define GEOS_LOG_LEVEL_RANK_0 | ( | minLevel, | |
msg | |||
) | GEOS_LOG_RANK_0_IF( this->getLogLevel() >= minLevel, msg ) |
Output messages (only on rank 0) based on current Group's log level.
[in] | minLevel | minimum log level |
[in] | msg | a message to log (any expression that can be stream inserted) |
Definition at line 484 of file Logger.hpp.
#define GEOS_LOG_RANK | ( | msg | ) | GEOS_LOG_RANK_IF( true, msg ) |
Log a message to the rank output stream.
msg | a message to log (any expression that can be stream inserted) |
Definition at line 126 of file Logger.hpp.
#define GEOS_LOG_RANK_0 | ( | msg | ) | GEOS_LOG_RANK_0_IF( true, msg ) |
Log a message on screen on rank 0.
msg | a message to log (any expression that can be stream inserted) |
Definition at line 101 of file Logger.hpp.
#define GEOS_LOG_RANK_0_IF | ( | EXP, | |
msg | |||
) |
Conditionally log a message on screen on rank 0.
EXP | an expression that will be evaluated as a predicate |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 72 of file Logger.hpp.
#define GEOS_LOG_RANK_0_IF_NLR | ( | EXP, | |
msg | |||
) |
Conditionally log a message on screen on rank 0 without line breaking.
EXP | an expression that will be evaluated as a predicate |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 87 of file Logger.hpp.
#define GEOS_LOG_RANK_IF | ( | EXP, | |
msg | |||
) |
Conditionally log a message to the rank output stream.
EXP | an expression that will be evaluated as a predicate |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 111 of file Logger.hpp.
#define GEOS_LOG_RANK_VAR | ( | var | ) | GEOS_LOG_RANK( #var " = " << var ) |
Log a variable/expression name and value on screen to the rank output stream.
var | a variable or expression accessible from current scope that can be stream inserted |
Definition at line 132 of file Logger.hpp.
#define GEOS_LOG_VAR | ( | ... | ) | LVARRAY_LOG_VAR( __VA_ARGS__ ) |
Log an expression and its value on screen.
The expression to log must evaluate something that can be stream inserted.
Definition at line 46 of file Logger.hpp.
#define GEOS_THROW | ( | msg, | |
TYPE | |||
) | GEOS_THROW_IF( true, msg, TYPE ) |
Throw an exception.
msg | a message to log (any expression that can be stream inserted) |
TYPE | the type of exception to throw |
Definition at line 164 of file Logger.hpp.
#define GEOS_THROW_IF | ( | EXP, | |
msg, | |||
TYPE | |||
) | LVARRAY_THROW_IF( EXP, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Conditionally throw an exception.
EXP | an expression that will be evaluated as a predicate |
msg | a message to log (any expression that can be stream inserted) |
TYPE | the type of exception to throw |
Definition at line 151 of file Logger.hpp.
#define GEOS_THROW_IF_EQ | ( | lhs, | |
rhs, | |||
TYPE | |||
) | GEOS_THROW_IF_EQ_MSG( lhs, rhs, "", TYPE ) |
Raise a hard error if two values are equal.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
TYPE | the type of exception to throw |
Definition at line 235 of file Logger.hpp.
#define GEOS_THROW_IF_EQ_MSG | ( | lhs, | |
rhs, | |||
msg, | |||
TYPE | |||
) | LVARRAY_THROW_IF_EQ_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Raise a hard error if two values are equal.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
TYPE | the type of exception to throw |
Definition at line 220 of file Logger.hpp.
#define GEOS_THROW_IF_GE | ( | lhs, | |
rhs, | |||
TYPE | |||
) | GEOS_ERROR_IF_GE_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares greater than or equal to the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
TYPE | the type of exception to throw |
Definition at line 331 of file Logger.hpp.
#define GEOS_THROW_IF_GE_MSG | ( | lhs, | |
rhs, | |||
msg, | |||
TYPE | |||
) | LVARRAY_THROW_IF_GE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if one value compares greater than or equal to the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
TYPE | the type of exception to throw |
Definition at line 316 of file Logger.hpp.
#define GEOS_THROW_IF_GT | ( | lhs, | |
rhs, | |||
TYPE | |||
) | GEOS_ERROR_IF_GT_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares greater than the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
TYPE | the type of exception to throw |
Definition at line 299 of file Logger.hpp.
#define GEOS_THROW_IF_GT_MSG | ( | lhs, | |
rhs, | |||
msg, | |||
TYPE | |||
) | LVARRAY_THROW_IF_GT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if one value compares greater than the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
TYPE | the type of exception to throw |
Definition at line 284 of file Logger.hpp.
#define GEOS_THROW_IF_LE | ( | lhs, | |
rhs, | |||
TYPE | |||
) | GEOS_ERROR_IF_LE_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares less than or equal to the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
TYPE | the type of exception to throw |
Definition at line 395 of file Logger.hpp.
#define GEOS_THROW_IF_LE_MSG | ( | lhs, | |
rhs, | |||
msg, | |||
TYPE | |||
) | LVARRAY_THROW_IF_LE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if one value compares less than or equal to the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
TYPE | the type of exception to throw |
Definition at line 380 of file Logger.hpp.
#define GEOS_THROW_IF_LT | ( | lhs, | |
rhs, | |||
TYPE | |||
) | GEOS_ERROR_IF_LT_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares less than the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
TYPE | the type of exception to throw |
Definition at line 363 of file Logger.hpp.
#define GEOS_THROW_IF_LT_MSG | ( | lhs, | |
rhs, | |||
msg, | |||
TYPE | |||
) | LVARRAY_THROW_IF_LT_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if one value compares less than the other.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
TYPE | the type of exception to throw |
Definition at line 348 of file Logger.hpp.
#define GEOS_THROW_IF_NE | ( | lhs, | |
rhs, | |||
TYPE | |||
) | GEOS_THROW_IF_NE_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if two values are not equal.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
TYPE | the type of exception to throw |
Definition at line 267 of file Logger.hpp.
#define GEOS_THROW_IF_NE_MSG | ( | lhs, | |
rhs, | |||
msg, | |||
TYPE | |||
) | LVARRAY_THROW_IF_NE_MSG( lhs, rhs, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE ) |
Throw an exception if two values are not equal.
lhs | expression to be evaluated and used as left-hand side in comparison |
rhs | expression to be evaluated and used as right-hand side in comparison |
msg | a message to log (any expression that can be stream inserted) |
TYPE | the type of exception to throw |
Definition at line 252 of file Logger.hpp.
#define GEOS_WARNING | ( | msg | ) | LVARRAY_WARNING( msg ) |
Report a warning.
msg | a message to log (any expression that can be stream inserted) |
Definition at line 190 of file Logger.hpp.
#define GEOS_WARNING_IF | ( | EXP, | |
msg | |||
) | LVARRAY_WARNING_IF( EXP, msg ) |
Conditionally report a warning.
EXP | an expression that will be evaluated as a predicate |
msg | a message to log (any expression that can be stream inserted) |
Definition at line 184 of file Logger.hpp.
void geos::logger::InitializeLogger | ( | const std::string & | rank_output_dir = "" | ) |
Initialize the logger in a serial build.
rank_output_dir | output directory for rank log files |