#include <iomanip>
#include <iostream>
#include <string>
#include <boost/algorithm/string.hpp>
#include "pfasst/config.hpp"
#include <pfasst/easylogging++.h>
Go to the source code of this file.
Classes | |
struct | OUT |
Some general variables for coloured terminal output. More... | |
Namespaces | |
pfasst | |
pfasst::log | |
Logging facilities for PFASST++. | |
Macros | |
#define | ELPP_STL_LOGGING |
#define | ELPP_NO_DEFAULT_LOG_FILE |
#define | ELPP_LOGGING_FLAGS_FROM_ARG |
#define | ELPP_DEBUG_ASSERT_FAILURE |
#define | ELPP_STACKTRACE_ON_CRASH |
#define | PFASST_LOGGER_INITIALIZED |
Guard symbol to ensure easylogging++ is only initialized once. More... | |
#define | PFASST_LOGGER_DEFAULT_GLOBAL_MILLISECOND_WIDTH "2" |
precision of milliseconds to be printed More... | |
#define | VLOG_FUNC_START(scope) |
#define | VLOG_FUNC_END(scope) |
#define | LOG_PRECISION 5 |
#define | LOG_INDENT string(pfasst::log::stack_position * 2, ' ') |
Utility macro for creating identation depending on current stack position. More... | |
#define | LOGGER_ID_LENGTH 10 |
Length of logger ID to print. More... | |
#define | ML_LOG(level, x) LOG(level) << x |
same as LOG(level, x) from easylogging++ More... | |
#define | ML_CLOG(level, logger_id, x) CLOG(level, logger_id) << x |
same as CLOG(level, logger, x) from easylogging++ More... | |
#define | ML_CLOG_IF(condition, level, logger_id, x) CLOG_IF(condition, level, logger_id) << x |
same as CLOG_IF(condition, level, logger, x) from easylogging++ More... | |
#define | ML_CVLOG(verbose_level, logger_id, x) CVLOG(verbose_level, logger_id) << x |
same as CVLOG(verbosity, logger, x) from easylogging++ More... | |
#define | ML_CVLOG_IF(condition, verbose_level, logger_id, x) CVLOG_IF(condition, verbose_level, logger_id) << x |
same as CVLOG_IF(condition, verbosity, logger, x) from easylogging++ 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::add_custom_logger (const string &id) |
Provides convenient way of adding additional named loggers. 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::test_logging_levels () |
Prints example logging for all logging levels for the default logger. More... | |
static void | pfasst::log::start_log (int argc, char **argv) |
Starts easylogging++ with given arguments and loads configuration. More... | |
Variables | |
static size_t | pfasst::log::stack_position |
static bool | pfasst::log::initialized = false |
internal flag identifying whether the default logger has been initialized. More... | |
The most important and most frequently used logging macros provided by easylogging++ are wrapped in the ML_*
macros to avoid the evaluation of string conversion operations when logging is disabled.
Without these wrappers, using the easylogging++ logging macros will lead to evaluation of string operations even with logging disabled at compile time.
Instead of using
LOG(INFO) << "This is a logging line with string conversion " << my_variable;
one should now use
ML_LOG(INFO, "This is a logging line with string conversion " << my_variable);
Definition in file logging.hpp.
#define ELPP_DEBUG_ASSERT_FAILURE |
Definition at line 92 of file logging.hpp.
#define ELPP_LOGGING_FLAGS_FROM_ARG |
Definition at line 89 of file logging.hpp.
#define ELPP_NO_DEFAULT_LOG_FILE |
Definition at line 87 of file logging.hpp.
#define ELPP_STACKTRACE_ON_CRASH |
Definition at line 93 of file logging.hpp.
#define ELPP_STL_LOGGING |
Definition at line 85 of file logging.hpp.
#define LOG_INDENT string(pfasst::log::stack_position * 2, ' ') |
Utility macro for creating identation depending on current stack position.
This uses pfasst::log::stack_position to create a spacing string twice as long.
Definition at line 200 of file logging.hpp.
Referenced by pfasst::examples::boris::ParticleCloud< precision >::distribute_around_center().
#define LOG_PRECISION 5 |
Definition at line 192 of file logging.hpp.
Referenced by pfasst::examples::boris::Particle< precision >::log(), and pfasst::examples::boris::ParticleCloud< precision >::log().
#define LOGGER_ID_LENGTH 10 |
Length of logger ID to print.
Longer logger IDs will usually get cut off.
Definition at line 210 of file logging.hpp.
Referenced by pfasst::log::add_custom_logger().
#define ML_CLOG | ( | level, | |
logger_id, | |||
x | |||
) | CLOG(level, logger_id) << x |
same as CLOG(level, logger, x)
from easylogging++
Definition at line 117 of file logging.hpp.
Referenced by pfasst::log::add_custom_logger(), pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper< time >::echo_residual(), pfasst::IStatus::keep_iterating(), main(), pfasst::encap::ImplicitSweeper< time >::predict(), pfasst::mpi::MPIStatus::recv(), pfasst::encap::PolyInterpMixin< time >::restrict(), pfasst::PFASST< time >::run(), pfasst::examples::boris::run_boris_pfasst(), pfasst::examples::boris::run_boris_sdc(), pfasst::examples::advection_diffusion::run_mpi_pfasst(), pfasst::mpi::MPIStatus::send(), pfasst::mpi::MPIStatus::set_converged(), pfasst::encap::ImplicitSweeper< time >::setup(), pfasst::log::start_log(), pfasst::encap::ImplicitSweeper< time >::sweep(), pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper< time >::~AdvectionDiffusionSweeper(), and pfasst::encap::VectorEncapsulation< scalar, time >::~VectorEncapsulation().
#define ML_CLOG_IF | ( | condition, | |
level, | |||
logger_id, | |||
x | |||
) | CLOG_IF(condition, level, logger_id) << x |
same as CLOG_IF(condition, level, logger, x)
from easylogging++
Definition at line 124 of file logging.hpp.
#define ML_CVLOG | ( | verbose_level, | |
logger_id, | |||
x | |||
) | CVLOG(verbose_level, logger_id) << x |
same as CVLOG(verbosity, logger, x)
from easylogging++
Definition at line 131 of file logging.hpp.
Referenced by pfasst::examples::boris::bindings::WrapperSimplePhysicsSolver< scalar, time >::b_field_evaluate(), pfasst::MLSDC< time >::cycle_down(), pfasst::MLSDC< time >::cycle_up(), pfasst::examples::boris::bindings::WrapperSimplePhysicsSolver< scalar, time >::e_field_evaluate(), pfasst::examples::boris::bindings::WrapperSimplePhysicsSolver< scalar, time >::energy(), pfasst::examples::boris::bindings::WrapperSimplePhysicsSolver< scalar, time >::external_e_field_evaluate(), pfasst::examples::boris::bindings::WrapperSimplePhysicsSolver< scalar, time >::force_evaluate(), pfasst::MLSDC< time >::perform_sweeps(), pfasst::encap::IMEXSweeper< time >::predict_with_left(), pfasst::encap::IMEXSweeper< time >::predict_without_left(), pfasst::encap::IMEXSweeper< time >::sweep_with_left(), pfasst::encap::IMEXSweeper< time >::sweep_without_left(), and pfasst::log::test_logging_levels().
#define ML_CVLOG_IF | ( | condition, | |
verbose_level, | |||
logger_id, | |||
x | |||
) | CVLOG_IF(condition, verbose_level, logger_id) << x |
same as CVLOG_IF(condition, verbosity, logger, x)
from easylogging++
Definition at line 138 of file logging.hpp.
#define ML_LOG | ( | level, | |
x | |||
) | LOG(level) << x |
same as LOG(level, x)
from easylogging++
Definition at line 110 of file logging.hpp.
Referenced by pfasst::examples::scalar::ScalarSweeper< time >::echo_error(), pfasst::examples::vdp::VdpSweeper< time >::echo_error(), main(), pfasst::examples::boris::operator*(), pfasst::examples::boris::operator+(), pfasst::examples::advection_diffusion::run_mpi_pfasst(), pfasst::examples::advection_diffusion::run_serial_mlsdc(), pfasst::log::test_logging_levels(), pfasst::examples::scalar::ScalarSweeper< time >::~ScalarSweeper(), and pfasst::examples::vdp::VdpSweeper< time >::~VdpSweeper().
#define PFASST_LOGGER_DEFAULT_GLOBAL_MILLISECOND_WIDTH "2" |
precision of milliseconds to be printed
Definition at line 168 of file logging.hpp.
Referenced by pfasst::log::set_global_logging_options().
#define PFASST_LOGGER_INITIALIZED |
Guard symbol to ensure easylogging++ is only initialized once.
When this symbol is defined, it is expected that _INITIALIZE_EASYLOGGINGPP
has been called once to initialize easylogging++.
Definition at line 163 of file logging.hpp.
#define VLOG_FUNC_END | ( | scope | ) |
CVLOG(level, logger)
directly. Definition at line 186 of file logging.hpp.
#define VLOG_FUNC_START | ( | scope | ) |
CVLOG(level, logger)
directly. Definition at line 176 of file logging.hpp.
Referenced by pfasst::examples::boris::ParticleCloud< precision >::distribute_around_center().