zxs 1 день назад
Родитель
Сommit
caa36cf382
1 измененных файлов с 6 добавлено и 12 удалено
  1. 6 12
      robot/robotics/logger.hpp

+ 6 - 12
robot/robotics/logger.hpp

@@ -14,8 +14,7 @@
 //robotics
 #include "logger_impl.h"
 
-#ifdef filename_
-#else
+#ifndef filename_
 #ifdef WINDOWS_BUILD
 #define filename_(x) strrchr(x,'\\')?strrchr(x,'\\')+1:x
 #elif LINUX_BUILD
@@ -23,27 +22,22 @@
 #endif
 #endif // filename_
 
-#ifdef LOG_INSTALL
-#else
+#ifndef LOG_INSTALL
 #define LOG_INSTALL robotics::v3::logger_impl::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
 #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
 #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
 #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
 #endif // LOG_ERROR