27#ifndef EASY3D_UTIL_LOGGING_H
28#define EASY3D_UTIL_LOGGING_H
31#include <3rd_party/easyloggingpp/easylogging++.h>
36#define LOG_IF_EVERY_N(n, condition, LEVEL) if (condition) \
37 CLOG_EVERY_N(n, LEVEL, ELPP_CURR_FILE_LOGGER_ID)
41#define LOG_IF_FIRST_N(n, condition, LEVEL) if (condition) \
42 CLOG_N_TIMES(n, LEVEL, ELPP_CURR_FILE_LOGGER_ID)
45#define COUNTER ELPP_COUNTER->hitCounts()
70 bool info_to_stdout =
false,
71 bool warning_to_stdcout =
true,
72 bool error_to_stdcout =
true,
73 bool verbose_to_stdcout =
false,
74 const std::string &
log_file =
"default",
75 int verbosity_threshold = 9
91 virtual void send(el::Level level,
const std::string& msg) = 0;
virtual void send(el::Level level, const std::string &msg)=0
writes the log message msg (and may also other given information).
void initialize(bool info_to_stdout=false, bool warning_to_stdcout=true, bool error_to_stdcout=true, bool verbose_to_stdcout=false, const std::string &log_file="default", int verbosity_threshold=9)
Initializes the logging module.
std::string log_file()
Returns the full path of the log file (empty if no log file has been created).
bool is_initialized()
Returns whether the logging has been initialized.
Definition: collider.cpp:182