GEOS
Classes | Namespaces | Macros | Functions
Logger.hpp File Reference
#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.
 

Macro Definition Documentation

◆ GEOS_ASSERT

#define GEOS_ASSERT (   EXP)    GEOS_ASSERT_MSG( EXP, "" )

Assert a condition in debug builds.

Parameters
EXPan expression that will be evaluated as a predicate

Definition at line 177 of file Logger.hpp.

◆ GEOS_ASSERT_EQ

#define GEOS_ASSERT_EQ (   lhs,
  rhs 
)    GEOS_ASSERT_EQ_MSG( lhs, rhs, "" )

Assert that two values compare equal in debug builds.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 410 of file Logger.hpp.

◆ GEOS_ASSERT_EQ_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 403 of file Logger.hpp.

◆ GEOS_ASSERT_GE

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 455 of file Logger.hpp.

◆ GEOS_ASSERT_GE_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 448 of file Logger.hpp.

◆ GEOS_ASSERT_GT

#define GEOS_ASSERT_GT (   lhs,
  rhs 
)    GEOS_ASSERT_GT_MSG( lhs, rhs, "" )

Assert that one value compares greater than the other in debug builds.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 440 of file Logger.hpp.

◆ GEOS_ASSERT_GT_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 433 of file Logger.hpp.

◆ GEOS_ASSERT_MSG

#define GEOS_ASSERT_MSG (   EXP,
  msg 
)    LVARRAY_ASSERT_MSG( EXP, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg )

Assert a condition in debug builds.

Parameters
EXPan expression that will be evaluated as a predicate
msga message to log (any expression that can be stream inserted)

Definition at line 171 of file Logger.hpp.

◆ GEOS_ASSERT_NE

#define GEOS_ASSERT_NE (   lhs,
  rhs 
)    LVARRAY_ASSERT_NE( lhs, rhs )

Assert that two values compare not equal in debug builds.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 425 of file Logger.hpp.

◆ GEOS_ASSERT_NE_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 418 of file Logger.hpp.

◆ GEOS_ERROR

#define GEOS_ERROR (   msg)    GEOS_ERROR_IF( true, msg )

Raise a hard error and terminate the program.

Parameters
msga message to log (any expression that can be stream inserted)

Definition at line 157 of file Logger.hpp.

◆ GEOS_ERROR_IF

#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.

Parameters
EXPan expression that will be evaluated as a predicate
msga message to log (any expression that can be stream inserted)

Definition at line 142 of file Logger.hpp.

◆ GEOS_ERROR_IF_EQ

#define GEOS_ERROR_IF_EQ (   lhs,
  rhs 
)    GEOS_ERROR_IF_EQ_MSG( lhs, rhs, "" )

Raise a hard error if two values are equal.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 227 of file Logger.hpp.

◆ GEOS_ERROR_IF_EQ_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 211 of file Logger.hpp.

◆ GEOS_ERROR_IF_GE

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 323 of file Logger.hpp.

◆ GEOS_ERROR_IF_GE_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 307 of file Logger.hpp.

◆ GEOS_ERROR_IF_GT

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 291 of file Logger.hpp.

◆ GEOS_ERROR_IF_GT_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 275 of file Logger.hpp.

◆ GEOS_ERROR_IF_LE

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 387 of file Logger.hpp.

◆ GEOS_ERROR_IF_LE_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 371 of file Logger.hpp.

◆ GEOS_ERROR_IF_LT

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 355 of file Logger.hpp.

◆ GEOS_ERROR_IF_LT_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 339 of file Logger.hpp.

◆ GEOS_ERROR_IF_NE

#define GEOS_ERROR_IF_NE (   lhs,
  rhs 
)    GEOS_ERROR_IF_NE_MSG( lhs, rhs, "" )

Raise a hard error if two values are not equal.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison

Definition at line 259 of file Logger.hpp.

◆ GEOS_ERROR_IF_NE_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)

Definition at line 243 of file Logger.hpp.

◆ GEOS_INFO

#define GEOS_INFO (   msg)    LVARRAY_INFO( msg )

Log an info message.

Parameters
msga message to log (any expression that can be stream inserted)

Definition at line 203 of file Logger.hpp.

◆ GEOS_INFO_IF

#define GEOS_INFO_IF (   EXP,
  msg 
)    LVARRAY_INFO_IF( EXP, msg )

Conditionally log an info message.

Parameters
EXPan expression that will be evaluated as a predicate
msga message to log (any expression that can be stream inserted)

Definition at line 197 of file Logger.hpp.

◆ GEOS_LOG

#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.

◆ GEOS_LOG_IF

#define GEOS_LOG_IF (   EXP,
  msg 
)
Value:
do { \
if( EXP ) \
{ \
std::cout<< msg << std::endl; \
} \
} while( false )

Conditionally log a message.

Parameters
EXPan expression that will be evaluated as a predicate
msga message to log (any expression that can be stream inserted)

Definition at line 57 of file Logger.hpp.

◆ GEOS_LOG_LEVEL

#define GEOS_LOG_LEVEL (   minLevel,
  msg 
)    GEOS_LOG_IF( this->getLogLevel() >= minLevel, msg );

Output messages based on current Group's log level.

Parameters
[in]minLevelminimum log level
[in]msga message to log (any expression that can be stream inserted)
Deprecated:
Will be replaced by GEOS_LOG_LEVEL_INFO

Definition at line 476 of file Logger.hpp.

◆ GEOS_LOG_LEVEL_BY_RANK

#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.

Parameters
[in]minLevelminimum log level
[in]msga message to log (any expression that can be stream inserted)
Deprecated:
Will be replaced by GEOS_LOG_LEVEL_INFO_BY_RANK

Definition at line 492 of file Logger.hpp.

◆ GEOS_LOG_LEVEL_FN

#define GEOS_LOG_LEVEL_FN (   minLevel,
  fn 
)
Value:
do { \
if( this->getLogLevel() >= minLevel ) \
{ \
fn; \
} \
} while( false )

Macro used to turn on/off a function based on the log level.

Parameters
[in]minLevelMinimum log level
[in]fnFunction to filter

Definition at line 462 of file Logger.hpp.

◆ GEOS_LOG_LEVEL_RANK_0

#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.

Parameters
[in]minLevelminimum log level
[in]msga message to log (any expression that can be stream inserted)
Deprecated:
Will be replaced by GEOS_LOG_LEVEL_INFO_RANK_0

Definition at line 484 of file Logger.hpp.

◆ GEOS_LOG_RANK

#define GEOS_LOG_RANK (   msg)    GEOS_LOG_RANK_IF( true, msg )

Log a message to the rank output stream.

Parameters
msga message to log (any expression that can be stream inserted)

Definition at line 126 of file Logger.hpp.

◆ GEOS_LOG_RANK_0

#define GEOS_LOG_RANK_0 (   msg)    GEOS_LOG_RANK_0_IF( true, msg )

Log a message on screen on rank 0.

Parameters
msga message to log (any expression that can be stream inserted)

Definition at line 101 of file Logger.hpp.

◆ GEOS_LOG_RANK_0_IF

#define GEOS_LOG_RANK_0_IF (   EXP,
  msg 
)
Value:
do { \
if( ::geos::logger::internal::rank == 0 && EXP ) \
{ \
std::ostringstream oss; \
oss << msg; \
std::cout << oss.str() << std::endl; \
} \
} while( false )

Conditionally log a message on screen on rank 0.

Parameters
EXPan expression that will be evaluated as a predicate
msga message to log (any expression that can be stream inserted)

Definition at line 72 of file Logger.hpp.

◆ GEOS_LOG_RANK_0_IF_NLR

#define GEOS_LOG_RANK_0_IF_NLR (   EXP,
  msg 
)
Value:
do { \
if( ::geos::logger::internal::rank == 0 && EXP ) \
{ \
std::ostringstream oss; \
oss << msg; \
std::cout << oss.str(); \
} \
} while( false )

Conditionally log a message on screen on rank 0 without line breaking.

Parameters
EXPan expression that will be evaluated as a predicate
msga message to log (any expression that can be stream inserted)

Definition at line 87 of file Logger.hpp.

◆ GEOS_LOG_RANK_IF

#define GEOS_LOG_RANK_IF (   EXP,
  msg 
)
Value:
do { \
if( EXP ) \
{ \
std::ostringstream oss; \
oss << "Rank " << ::geos::logger::internal::rankString << ": " << msg; \
*logger::internal::rankStream << oss.str() << std::endl; \
} \
} while( false )

Conditionally log a message to the rank output stream.

Parameters
EXPan expression that will be evaluated as a predicate
msga message to log (any expression that can be stream inserted)

Definition at line 111 of file Logger.hpp.

◆ GEOS_LOG_RANK_VAR

#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.

Parameters
vara variable or expression accessible from current scope that can be stream inserted

Definition at line 132 of file Logger.hpp.

◆ GEOS_LOG_VAR

#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.

◆ GEOS_THROW

#define GEOS_THROW (   msg,
  TYPE 
)    GEOS_THROW_IF( true, msg, TYPE )

Throw an exception.

Parameters
msga message to log (any expression that can be stream inserted)
TYPEthe type of exception to throw

Definition at line 164 of file Logger.hpp.

◆ GEOS_THROW_IF

#define GEOS_THROW_IF (   EXP,
  msg,
  TYPE 
)    LVARRAY_THROW_IF( EXP, "***** Rank " << ::geos::logger::internal::rankString << ": " << msg, TYPE )

Conditionally throw an exception.

Parameters
EXPan expression that will be evaluated as a predicate
msga message to log (any expression that can be stream inserted)
TYPEthe type of exception to throw

Definition at line 151 of file Logger.hpp.

◆ GEOS_THROW_IF_EQ

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
TYPEthe type of exception to throw

Definition at line 235 of file Logger.hpp.

◆ GEOS_THROW_IF_EQ_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)
TYPEthe type of exception to throw

Definition at line 220 of file Logger.hpp.

◆ GEOS_THROW_IF_GE

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
TYPEthe type of exception to throw

Definition at line 331 of file Logger.hpp.

◆ GEOS_THROW_IF_GE_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)
TYPEthe type of exception to throw

Definition at line 316 of file Logger.hpp.

◆ GEOS_THROW_IF_GT

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
TYPEthe type of exception to throw

Definition at line 299 of file Logger.hpp.

◆ GEOS_THROW_IF_GT_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)
TYPEthe type of exception to throw

Definition at line 284 of file Logger.hpp.

◆ GEOS_THROW_IF_LE

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
TYPEthe type of exception to throw

Definition at line 395 of file Logger.hpp.

◆ GEOS_THROW_IF_LE_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)
TYPEthe type of exception to throw

Definition at line 380 of file Logger.hpp.

◆ GEOS_THROW_IF_LT

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
TYPEthe type of exception to throw

Definition at line 363 of file Logger.hpp.

◆ GEOS_THROW_IF_LT_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)
TYPEthe type of exception to throw

Definition at line 348 of file Logger.hpp.

◆ GEOS_THROW_IF_NE

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
TYPEthe type of exception to throw

Definition at line 267 of file Logger.hpp.

◆ GEOS_THROW_IF_NE_MSG

#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.

Parameters
lhsexpression to be evaluated and used as left-hand side in comparison
rhsexpression to be evaluated and used as right-hand side in comparison
msga message to log (any expression that can be stream inserted)
TYPEthe type of exception to throw

Definition at line 252 of file Logger.hpp.

◆ GEOS_WARNING

#define GEOS_WARNING (   msg)    LVARRAY_WARNING( msg )

Report a warning.

Parameters
msga message to log (any expression that can be stream inserted)

Definition at line 190 of file Logger.hpp.

◆ GEOS_WARNING_IF

#define GEOS_WARNING_IF (   EXP,
  msg 
)    LVARRAY_WARNING_IF( EXP, msg )

Conditionally report a warning.

Parameters
EXPan expression that will be evaluated as a predicate
msga message to log (any expression that can be stream inserted)

Definition at line 184 of file Logger.hpp.

Function Documentation

◆ InitializeLogger()

void geos::logger::InitializeLogger ( const std::string &  rank_output_dir = "")

Initialize the logger in a serial build.

Parameters
rank_output_diroutput directory for rank log files