HTTP Server upon new mbed Ethernet Interface. Based on original code by Henry Leinen.

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of HTTP_server by pablo gindel

debug.h

Committer:
pabloxid
Date:
2013-07-28
Revision:
2:dc9184e97328
Parent:
0:fcceff3299be

File content as of revision 2:dc9184e97328:

#ifndef __DEBUG_H__
#define __DEBUG_H__


#if (DEBUG == 3)

#define INFO(x, ...) std::printf("[INFO: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
#define WARN(x, ...) std::printf("[WARN: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
#define ERR(x, ...) std::printf("[ERR: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);

#elif (DEBUG == 2)

#define INFO(x, ...)
#define WARN(x, ...) std::printf("[WARN: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
#define ERR(x, ...) std::printf("[ERR: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);

#elif (DEBUG == 1)

#define INFO(x, ...)
#define WARN(x, ...)
#define ERR(x, ...) std::printf("[ERR: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);

#else

#define INFO(x, ...)
#define WARN(x, ...)
#define ERR(x, ...)

#endif


#endif //   __DEBUG_H__#ifndef __DEBUG_H__