MachineIntelligenceCore:Toolchain
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Log.hpp
Go to the documentation of this file.
1 
23 #ifndef SRC_CONFIGURATION_LOG_HPP_
24 #define SRC_CONFIGURATION_LOG_HPP_
25 
26 
27 
28 #include <logger/ScopeLogger.hpp>
29 
34 #define LOGGER mic::logger::Logger::getInstance()
35 
39 #define LOG(level) (mic::logger::ScopeLogger(LOGGER, __FILE__, __LINE__, level).get())
40 
45 #define CHECK(EXP) mic::logger::check(EXP, #EXP, __LINE__, __FILE__)
46 
47 namespace mic {
48 namespace logger {
49 
54 static __inline__ void check(bool condition, const char* expression, int line, const char* file) {
55  if (!(condition))
56  LOG(LWARNING) << "Oops! '"<< expression <<"' is FALSE, Line " << line << " of file " << file;
57 }
58 
59 } /* namespace logger */
60 } /* namespace mic */
61 
62 #endif /* SRC_CONFIGURATION_LOG_HPP_ */
Contains definition of ScopeLogger class.
#define LWARNING
Definition: LoggerAux.hpp:57
#define LOG(level)
Macro for message printing.
Definition: Log.hpp:39