PFASST++
Internals

Entities listed in this module are ment to be for internal use only and should not be used outside of PFASST++ itself. More...

Classes

class  pfasst::config::options
 Runtime config options provider. More...
 

Functions

string pfasst::log::format_mpi_rank (const char fill= ' ')
 Formats the local MPI world rank as a string. More...
 
string pfasst::log::get_log_file_name ()
 Composes the log file name for the local rank. More...
 
void pfasst::log::set_global_logging_options (el::Configurations *conf, const el::Configurations *default_conf=nullptr)
 Sets global logging options. More...
 
static void pfasst::log::load_default_config ()
 Sets default configuration for default loggers. More...
 
static void pfasst::log::set_logging_flags ()
 Sets some default flags for easylogging++. More...
 
static void pfasst::log::start_log (int argc, char **argv)
 Starts easylogging++ with given arguments and loads configuration. More...
 
static void pfasst::log::test_logging_levels ()
 Prints example logging for all logging levels for the default logger. More...
 

Detailed Description

Entities listed in this module are ment to be for internal use only and should not be used outside of PFASST++ itself.

Function Documentation

string pfasst::log::format_mpi_rank ( const char  fill = ' ')
inline

Formats the local MPI world rank as a string.

The local rank number as given by pfasst::config::get_rank() is filled from the left with the fill character.

Parameters
[in]widthwidth of the formatted rank
[in]fillcharacter used for left-filling
Returns
formatted rank
Since
v1.0.0

Definition at line 263 of file logging.hpp.

References pfasst::config::get_rank().

Referenced by pfasst::log::add_custom_logger(), and pfasst::log::get_log_file_name().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string pfasst::log::get_log_file_name ( )
inline

Composes the log file name for the local rank.

The rank-local log file name is composed of a potentially given log_prefix as given from the command line. In case MPI is enabled this prefix gets extended by _mpi-rank-<RANK> where <RANK> is the formatted MPI rank as determined by format_mpi_rank(). The file extension is always .log.

Returns
rank-local log file name
Since
v1.0.0

Definition at line 285 of file logging.hpp.

References pfasst::log::format_mpi_rank().

Referenced by pfasst::log::set_global_logging_options().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pfasst::log::load_default_config ( )
inlinestatic

Sets default configuration for default loggers.

Since
v0.3.0

Definition at line 422 of file logging.hpp.

References pfasst::log::add_custom_logger(), pfasst::log::initialized, and pfasst::log::set_global_logging_options().

Referenced by pfasst::log::start_log().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void pfasst::log::set_global_logging_options ( el::Configurations *  conf,
const el::Configurations *  default_conf = nullptr 
)
inline

Sets global logging options.

Parameters
[in,out]confconfiguration to extend and set
[in]default_confoptional, default configuration set to be used to retreive default options
Since
v1.0.0

Definition at line 309 of file logging.hpp.

References pfasst::config::options::get_instance(), pfasst::log::get_log_file_name(), pfasst::config::options::get_variables_map(), and PFASST_LOGGER_DEFAULT_GLOBAL_MILLISECOND_WIDTH.

Referenced by pfasst::log::add_custom_logger(), and pfasst::log::load_default_config().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pfasst::log::set_logging_flags ( )
inlinestatic

Sets some default flags for easylogging++.

Current defaults are:

  • LogDetailedCrashReason
  • DisableApplicationAbortOnFatalLog
  • ColoredTerminalOutput
  • MultiLoggerSupport
  • CreateLoggerAutomatically
See also
easylogging++ documentation on logging flags
Since
v0.3.0

Definition at line 460 of file logging.hpp.

Referenced by pfasst::log::start_log().

+ Here is the caller graph for this function:

static void pfasst::log::start_log ( int  argc,
char **  argv 
)
inlinestatic

Starts easylogging++ with given arguments and loads configuration.

Usually, you want to pass the command line arguments given to main(int, char**) in here and let easylogging++ figure out what it needs.

Parameters
[in]argcnumber of command line arguments as provided by main(int, char**)
[in]argvcommand line arguments as provided by main(int, char**)
Note
This function should not be called directly from user code but through pfasst::init.
Since
v0.3.0

Definition at line 518 of file logging.hpp.

References pfasst::log::load_default_config(), ML_CLOG, pfasst::log::set_logging_flags(), pfasst::log::stack_position, and pfasst::VERSION.

Referenced by pfasst::init(), and main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pfasst::log::test_logging_levels ( )
inlinestatic

Prints example logging for all logging levels for the default logger.

Note
When compiling with -DNDEBUG this function is a no-op.
Since
v0.3.0

Definition at line 487 of file logging.hpp.

References ML_CVLOG, and ML_LOG.