Implemented first Hangar-Service
Dependencies: CalibrateMagneto QuaternionMath
Fork of SML2 by
Logger.h
- Committer:
- pvaibhav
- Date:
- 2015-02-17
- Revision:
- 7:604a8369b801
- Parent:
- 3:ee90a9ada112
- Child:
- 8:cba37530d480
File content as of revision 7:604a8369b801:
#ifndef _H_LOGGER_H #define _H_LOGGER_H #define DATA_OUTPUT #include <cstdio> #if defined(DEBUG) && defined(OVERALL_DEBUG) #define LOG(x, ...) { printf("\x1b[34m%12.12s: \x1b[39m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } #define WARN(x, ...) { printf("\x1b[34m%12.12s: \x1b[33m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } #define ERR(x, ...) { printf("\x1b[34m%12.12s: \x1b[31m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } #define INFO(x, ...) { printf("\x1b[34m%12.12s: \x1b[32m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } #else #define LOG(x, ...) #define WARN(x, ...) #define ERR(x, ...) #define INFO(x, ...) #endif #if defined(DATA_OUTPUT) #define DATA(x) { fwrite(&(x), sizeof (x), 1, stdout); fflush(stdout); } #else #define DATA(x) #endif #endif//_H_LOGGER_H