52 #define LOGGER_MULTITHREAD
64 #define LOG_FILE(outputFile) { \
65 log::Logger::getInstance().setFile(outputFile); \
70 #if (LOG_LEVEL < 1) || (defined NDEBUG)
81 #define ERROR(msg) { \
82 std::ostringstream __debug_stream__; \
83 __debug_stream__ << "[ERROR]\t"; \
84 __debug_stream__ << msg; \
85 log::Logger::getInstance().print(__FILE__, __LINE__, \
86 __debug_stream__.str()); \
90 #if (LOG_LEVEL < 2) || (defined NDEBUG)
101 #define WARNING(msg) { \
102 std::ostringstream __debug_stream__; \
103 __debug_stream__ << "[WARNING]\t"; \
104 __debug_stream__ << msg; \
105 log::Logger::getInstance().print(__FILE__, __LINE__, \
106 __debug_stream__.str()); \
113 #if (LOG_LEVEL < 3) || (defined NDEBUG)
124 #define DEBUG(msg) { \
125 std::ostringstream __debug_stream__; \
126 __debug_stream__ << "[DEBUG]\t"; \
127 __debug_stream__ << msg; \
128 log::Logger::getInstance().print(__FILE__, __LINE__, \
129 __debug_stream__.str()); \
163 void print(
const std::string& sourceFile,
165 const std::string& message);
167 void setFile (
const std::string& outputFile);
173 #ifdef LOGGER_MULTITHREAD
205 inline static void lock();
210 inline static void unlock();
215 #endif // LOGGER_HPP_