8#define LOCATION std::string(__FILE__) + std::string(":") + std::to_string(__LINE__) + ":" + std::string(__func__) + ":"
12template <
typename T> std::ostream &
operator<<(std::ostream &out,
const std::vector<T> &v) {
14 size_t last = v.size() - 1;
15 for (
size_t i = 0; i < v.size(); ++i) {
25template <
typename T,
size_t N> std::ostream &
operator<<(std::ostream &out,
const std::array<T, N> &v) {
28 for (
size_t i = 0; i < N; ++i) {
37template <
typename K,
typename V> std::ostream &
operator<<(std::ostream &out,
const std::map<K, V> &v) {
41 out << kv.first <<
": " << kv.second << ((++i != v.size()) ?
", " :
"");
102 template <
typename... Strings>
void debug(
const Strings... s) { log<LOGGING_LEVEL::DEBUG>(
"[DEBUG]", s...); }
103 template <
typename... Strings>
void info(
const Strings... s) { log<LOGGING_LEVEL::INFO>(
"[INFO]", s...); }
104 template <
typename... Strings>
void warn(
const Strings... s) { log<LOGGING_LEVEL::WARNING>(
"[WARN]", s...); }
105 template <
typename... Strings>
void error(
const Strings... s) { log<LOGGING_LEVEL::ERROR>(
"[ERROR]", s...); }
108 template <LOGGING_LEVEL level>
void log_() {
115 template <
LOGGING_LEVEL level,
typename First,
typename... Strings>
void log_(First arg,
const Strings... s) {
140extern void set_streams(std::streambuf *out, std::streambuf *err);
void set_streams(std::streambuf *out, std::streambuf *err)
Definition logger.hpp:76
std::ofstream out_file
Definition logger.hpp:67
~Logger()
Definition logger.hpp:89
void set_verbosity(LOGGING_LEVEL level)
Definition logger.hpp:83
void warn(const Strings... s)
Definition logger.hpp:104
Logger()
Definition logger.hpp:84
void log(const Strings... s)
Definition logger.hpp:98
LOGGING_LEVEL VERBOSITY_LEVEL
Definition logger.hpp:65
void info(const Strings... s)
Definition logger.hpp:103
void debug(const Strings... s)
Definition logger.hpp:102
void set_streams(std::streambuf *out)
Definition logger.hpp:82
std::ostream * standard_output
Definition logger.hpp:63
std::ostream * error_output
Definition logger.hpp:64
std::streambuf * error_buf
Definition logger.hpp:62
void set_output_file(std::string filename)
Definition logger.hpp:70
void log_(First arg, const Strings... s)
Definition logger.hpp:115
void log_()
Definition logger.hpp:108
std::streambuf * standard_buf
Definition logger.hpp:61
void error(const Strings... s)
Definition logger.hpp:105
std::ostream & operator<<(std::ostream &out, const std::vector< T > &v)
Definition logger.hpp:12
aare::logger::Logger logger_instance
Definition logger.cpp:6
void warn(const Strings... s)
Definition logger.hpp:137
void set_verbosity(LOGGING_LEVEL level)
Definition logger.cpp:10
void set_output_file(std::string filename)
Definition logger.cpp:12
void log(const Strings... s)
Definition logger.hpp:132
void set_streams(std::streambuf *out, std::streambuf *err)
Definition logger.cpp:8
void error(const Strings... s)
Definition logger.hpp:138
void debug(const Strings... s)
Definition logger.hpp:135
void info(const Strings... s)
Definition logger.hpp:136
Logger & get_logger_instance()
Definition logger.cpp:11
LOGGING_LEVEL
Definition logger.hpp:51
@ WARNING
Definition logger.hpp:54
@ DEBUG
Definition logger.hpp:52
@ ERROR
Definition logger.hpp:55
@ INFO
Definition logger.hpp:53
Frame class to represent a single frame of data model class should be able to work with streams comin...
Definition CircularFifo.hpp:11