Version: SMASH-3.1
logging.h File Reference
#include <stdexcept>
#include <tuple>
#include "einhard.hpp"
#include "yaml-cpp/yaml.h"
#include "macros.h"

Go to the source code of this file.

Classes

struct  smash::LogArea::Main
 Log area tag type. More...
 
struct  smash::LogArea::Experiment
 Log area tag type. More...
 
struct  smash::LogArea::Box
 Log area tag type. More...
 
struct  smash::LogArea::Collider
 Log area tag type. More...
 
struct  smash::LogArea::Sphere
 Log area tag type. More...
 
struct  smash::LogArea::Action
 Log area tag type. More...
 
struct  smash::LogArea::InputParser
 Log area tag type. More...
 
struct  smash::LogArea::ParticleType
 Log area tag type. More...
 
struct  smash::LogArea::FindScatter
 Log area tag type. More...
 
struct  smash::LogArea::Clock
 Log area tag type. More...
 
struct  smash::LogArea::DecayModes
 Log area tag type. More...
 
struct  smash::LogArea::Resonances
 Log area tag type. More...
 
struct  smash::LogArea::ScatterAction
 Log area tag type. More...
 
struct  smash::LogArea::Distributions
 Log area tag type. More...
 
struct  smash::LogArea::Propagation
 Log area tag type. More...
 
struct  smash::LogArea::Grid
 Log area tag type. More...
 
struct  smash::LogArea::List
 Log area tag type. More...
 
struct  smash::LogArea::Nucleus
 Log area tag type. More...
 
struct  smash::LogArea::Density
 Log area tag type. More...
 
struct  smash::LogArea::PauliBlocking
 Log area tag type. More...
 
struct  smash::LogArea::Tmn
 Log area tag type. More...
 
struct  smash::LogArea::Fpe
 Log area tag type. More...
 
struct  smash::LogArea::Lattice
 Log area tag type. More...
 
struct  smash::LogArea::Pythia
 Log area tag type. More...
 
struct  smash::LogArea::GrandcanThermalizer
 Log area tag type. More...
 
struct  smash::LogArea::CrossSections
 Log area tag type. More...
 
struct  smash::LogArea::Output
 Log area tag type. More...
 
struct  smash::LogArea::HyperSurfaceCrossing
 Log area tag type. More...
 
struct  smash::LogArea::InitialConditions
 Log area tag type. More...
 
struct  smash::LogArea::ScatterActionMulti
 Log area tag type. More...
 
struct  smash::LogArea::Configuration
 Log area tag type. More...
 
struct  smash::LogArea::Potentials
 Log area tag type. More...
 
struct  smash::LogArea::RootSolver
 Log area tag type. More...
 
struct  smash::FormattingHelper< T >
 
struct  YAML::convert< einhard::LogLevel >
 

Namespaces

 smash
 
 smash::LogArea
 The namespace where log areas are declared.
 
 YAML
 

Macros

#define DECLARE_LOGAREA(id__, name__)
 Declares the necessary interface to identify a new log area. More...
 
#define SMASH_SOURCE_LOCATION    __FILE__ ":" + std::to_string(__LINE__) + " (" + __func__ + ')'
 Hackery that is required to output the location in the source code where the log statement occurs. More...
 

Typedefs

using smash::LogArea::AreaTuple = std::tuple< Main, Experiment, Box, Collider, Sphere, Action, InputParser, ParticleType, FindScatter, Clock, DecayModes, Resonances, ScatterAction, Distributions, Propagation, Grid, List, Nucleus, Density, PauliBlocking, Tmn, Fpe, Lattice, Pythia, GrandcanThermalizer, CrossSections, Output, HyperSurfaceCrossing, InitialConditions, ScatterActionMulti, Configuration, Potentials, RootSolver >
 This type collects all existing log areas so they will be created with the correct log level automatically. More...
 

Functions

void smash::create_all_loggers (Configuration config)
 Called from main() right after the Configuration object is fully set up to create all logger objects (as defined by LogArea::AreaTuple) with the correct area names and log levels. More...
 
einhard::LogLevel smash::default_loglevel ()
 
void smash::set_default_loglevel (einhard::LogLevel level)
 Set the default log level (what will be returned from subsequent default_loglevel calls). More...
 
template<typename T >
FormattingHelper< T > smash::format (const T &value, const char *unit, int width=-1, int precision=-1)
 Acts as a stream modifier for std::ostream to output an object with an optional suffix string and with a given field width and precision. More...
 

Variables

std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > smash::logg
 An array that stores all pre-configured Logger objects. More...