29 std::array<einhard::Logger<>, std::tuple_size<LogArea::AreaTuple>::value>
31 static std::array<einhard::Logger<>,
32 std::tuple_size<LogArea::AreaTuple>::value>
47 template <
int index,
int stop = 0>
48 constexpr
typename std::enable_if<(index == stop),
int>::type
50 using LogAreaTag =
typename std::remove_reference<decltype(std::get<index>(
51 std::declval<LogArea::AreaTuple &>()))>::type;
52 return LogAreaTag::textual_length();
66 template <
int index,
int stop = 0,
int mid = (index + stop) / 2>
67 constexpr
typename std::enable_if<(index > stop),
int>::type
69 return find_longest_logger_name<index, mid + 1>() >
70 find_longest_logger_name<mid, stop>()
71 ? find_longest_logger_name<index, mid + 1>()
72 : find_longest_logger_name<mid, stop>();
80 template <std::
size_t index,
int>
96 template <std::size_t index,
101 typename std::remove_reference<decltype(std::get<index - 1>(
102 std::declval<LogArea::AreaTuple &>()))>::type;
103 static_assert(LogAreaTag::id == index - 1,
104 "The order of types in LogArea::AreaTuple does not match the "
105 "id values in the LogArea types. Please fix! (see top of "
106 "'include/logging.h')");
107 auto &logger =
logg[LogAreaTag::id];
109 logger.setAreaName(tmp);
116 create_all_loggers_impl<std::tuple_size<LogArea::AreaTuple>::value>(config);
Interface to the SMASH configuration files.
T take(const Key< T > &key)
The default interface for SMASH to read configuration values.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > & logg
An array that stores all pre-configured Logger objects.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > & get_loggers()
Return the globally shared logger array.
void set_default_loglevel(einhard::LogLevel level)
Set the default log level (what will be returned from subsequent default_loglevel calls).
einhard::LogLevel default_loglevel()
void create_all_loggers(Configuration config)
Called from main() right after the Configuration object is fully set up to create all logger objects ...
LogLevel
Specification of the message severity.
std::string fill_both(const std::string &s, size_t width, char fill=' ')
Fill string with characters at both sides until the given width is reached.
static einhard::LogLevel global_default_loglevel
The default logging level is ALL.
constexpr std::enable_if<(index==stop), int >::type find_longest_logger_name()
std::enable_if<(index==0)>::type create_all_loggers_impl(Configuration &)