|
@@ -14,8 +14,7 @@
|
|
//robotics
|
|
//robotics
|
|
#include "logger_impl.h"
|
|
#include "logger_impl.h"
|
|
|
|
|
|
-#ifdef filename_
|
|
|
|
-#else
|
|
|
|
|
|
+#ifndef filename_
|
|
#ifdef WINDOWS_BUILD
|
|
#ifdef WINDOWS_BUILD
|
|
#define filename_(x) strrchr(x,'\\')?strrchr(x,'\\')+1:x
|
|
#define filename_(x) strrchr(x,'\\')?strrchr(x,'\\')+1:x
|
|
#elif LINUX_BUILD
|
|
#elif LINUX_BUILD
|
|
@@ -23,27 +22,22 @@
|
|
#endif
|
|
#endif
|
|
#endif // filename_
|
|
#endif // filename_
|
|
|
|
|
|
-#ifdef LOG_INSTALL
|
|
|
|
-#else
|
|
|
|
|
|
+#ifndef LOG_INSTALL
|
|
#define LOG_INSTALL robotics::v3::logger_impl::install()
|
|
#define LOG_INSTALL robotics::v3::logger_impl::install()
|
|
#endif // LOG_INSTALL
|
|
#endif // LOG_INSTALL
|
|
|
|
|
|
-#ifdef LOG_INFO
|
|
|
|
-#else
|
|
|
|
|
|
+#ifndef LOG_INFO
|
|
#define LOG_INFO robotics::v3::logger_stream(32, "info", robotics::v3::datetime::current_datetime().to_string(), filename_(__FILE__), __func__, __LINE__, std::this_thread::get_id()).stream
|
|
#define LOG_INFO robotics::v3::logger_stream(32, "info", robotics::v3::datetime::current_datetime().to_string(), filename_(__FILE__), __func__, __LINE__, std::this_thread::get_id()).stream
|
|
#endif // LOG_INFO
|
|
#endif // LOG_INFO
|
|
|
|
|
|
-#ifdef LOG_DEBUG
|
|
|
|
-#else
|
|
|
|
|
|
+#ifndef LOG_DEBUG
|
|
#define LOG_DEBUG robotics::v3::logger_stream(34, "debug", robotics::v3::datetime::current_datetime().to_string(), filename_(__FILE__), __func__, __LINE__, std::this_thread::get_id()).stream
|
|
#define LOG_DEBUG robotics::v3::logger_stream(34, "debug", robotics::v3::datetime::current_datetime().to_string(), filename_(__FILE__), __func__, __LINE__, std::this_thread::get_id()).stream
|
|
#endif // LOG_DEBUG
|
|
#endif // LOG_DEBUG
|
|
|
|
|
|
-#ifdef LOG_WARN
|
|
|
|
-#else
|
|
|
|
|
|
+#ifndef LOG_WARN
|
|
#define LOG_WARN robotics::v3::logger_stream(33, "warn", robotics::v3::datetime::current_datetime().to_string(), filename_(__FILE__), __func__, __LINE__, std::this_thread::get_id()).stream
|
|
#define LOG_WARN robotics::v3::logger_stream(33, "warn", robotics::v3::datetime::current_datetime().to_string(), filename_(__FILE__), __func__, __LINE__, std::this_thread::get_id()).stream
|
|
#endif // LOG_WARN
|
|
#endif // LOG_WARN
|
|
|
|
|
|
-#ifdef LOG_ERROR
|
|
|
|
-#else
|
|
|
|
|
|
+#ifndef LOG_ERROR
|
|
#define LOG_ERROR robotics::v3::logger_stream(31, "error", robotics::v3::datetime::current_datetime().to_string(), filename_(__FILE__), __func__, __LINE__, std::this_thread::get_id()).stream
|
|
#define LOG_ERROR robotics::v3::logger_stream(31, "error", robotics::v3::datetime::current_datetime().to_string(), filename_(__FILE__), __func__, __LINE__, std::this_thread::get_id()).stream
|
|
#endif // LOG_ERROR
|
|
#endif // LOG_ERROR
|