47 #ifndef _SUPER4PCS_UTILS_LOGGER_H 48 #define _SUPER4PCS_UTILS_LOGGER_H 73 template <
LogLevel level,
typename...Args>
74 inline void Log(
const Args&...args)
const{
77 LOG<NoLog, level>(args...);
80 LOG<ErrorReport, level>(args...);
83 LOG<Verbose, level>(args...);
91 static inline void print_err_impl(){
92 std::cerr << std::endl;
95 template<
typename First,
typename...Rest>
96 static inline void print_err_impl(
const First& param1,
const Rest&...param){
98 print_err_impl(param...);
100 static inline void print_msg_impl(){
101 std::cout << std::endl;
104 template<
typename First,
typename...Rest>
105 static inline void print_msg_impl(
const First& param1,
const Rest&...param){
107 print_msg_impl(param...);
111 static inline void LOG(
const Args&...args) {
112 if(msgLevel >= appLevel){
114 print_err_impl(args...);
116 print_msg_impl(args...);
void Log(const Args &...args) const
Definition: logger.h:74
void setLogLevel(LogLevel loglevel)
Definition: logger.h:70
Logger(LogLevel loglevel=Verbose)
Definition: logger.h:68
LogLevel
Definition: logger.h:55
LogLevel logLevel() const
Definition: logger.h:71