1#ifndef LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_LOGGER_H
2#define LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_LOGGER_H
51 void msg(
const std::string& message,
Level log_lvl);
53 template <
typename ForwardIt>
54 void msg(
const std::string& message, ForwardIt begin, ForwardIt end,
Level log_lvl,
int precision = 3) {
55 std::ostringstream os{};
57 if (!std::is_integral_v<
decltype(*begin)>) {
58 os << std::setprecision(precision);
60 std::copy(begin, end, std::ostream_iterator<
decltype(*begin)>(os,
", "));
61 msg(os.str(), log_lvl);
4-parameter interpolation of a 1-dimensional function given two points for which function values and ...
Definition: helper.h:10
A dummy structured logger.
Definition: Logger.h:40
void msg(const std::string &message, Level log_lvl)
Definition: Logger.cpp:16
bool data_dump
highest level of warning/error that can be logged
Definition: Logger.h:69
static std::string scientific(double val)
Converts double to a string in scientific notation.
Definition: Logger.cpp:33
void msg(const std::string &message, ForwardIt begin, ForwardIt end, Level log_lvl, int precision=3)
Definition: Logger.h:54
Level
Different levels of logging.
Definition: Logger.h:49
@ Info
Definition: Logger.h:49
@ Trace
Definition: Logger.h:49
@ Fatal
Definition: Logger.h:49
@ None
Definition: Logger.h:49
@ Error
Definition: Logger.h:49
@ Debug
Definition: Logger.h:49
@ Warn
Definition: Logger.h:49
Level max_trace_level
Definition: Logger.h:67
Level max_warn_level
highest level of trace message that can be logged
Definition: Logger.h:68