28 #ifndef SPLA_LOGGER_HPP
29 #define SPLA_LOGGER_HPP
50 void log_msg(
Status status,
const std::string& msg,
const std::string& file,
const std::string&
function,
int line);
56 mutable std::mutex m_mutex;
66 #define LOG_MSG(status, msg) \
68 std::stringstream __ss; \
70 Library::get()->get_logger()->log_msg(status, __ss.str(), __FILE__, __FUNCTION__, static_cast<int>(__LINE__)); \
73 #define LOG_MSG(status, msg) \
75 if ((status) != Status::Ok) { \
76 std::stringstream __ss; \
78 Library::get()->get_logger()->log_msg(status, __ss.str(), __FILE__, __FUNCTION__, static_cast<int>(__LINE__)); \
Callback function called on library message event.
Status of library operation execution.
Library logger.
Definition: logger.hpp:48
void log_msg(Status status, const std::string &msg, const std::string &file, const std::string &function, int line)
Definition: logger.cpp:34
void set_msg_callback(MessageCallback callback)
Definition: logger.cpp:40
Definition: algorithm.hpp:37