Fix macro as suggested in #1548
This commit is contained in:
parent
c70dc7497e
commit
c54bc05ba6
|
@ -10,16 +10,18 @@
|
||||||
#ifndef __HTTPCLIENT_H__
|
#ifndef __HTTPCLIENT_H__
|
||||||
#define __HTTPCLIENT_H__
|
#define __HTTPCLIENT_H__
|
||||||
|
|
||||||
#if defined(GLOBAL_DEBUG_ON)
|
static const char log_prefix[] = "HTTP client: ";
|
||||||
|
|
||||||
|
#if defined(DEVELOP_VERSION)
|
||||||
#define HTTPCLIENT_DEBUG_ON
|
#define HTTPCLIENT_DEBUG_ON
|
||||||
#endif
|
#endif
|
||||||
#if defined(HTTPCLIENT_DEBUG_ON)
|
#if defined(HTTPCLIENT_DEBUG_ON)
|
||||||
#define HTTPCLIENT_DEBUG(format, ...) dbg_printf("HTTP client: "format"\n", ##__VA_ARGS__)
|
#define HTTPCLIENT_DEBUG(format, ...) dbg_printf("%s"format"\n", log_prefix, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define HTTPCLIENT_DEBUG(format, ...)
|
#define HTTPCLIENT_DEBUG(...)
|
||||||
#endif
|
#endif
|
||||||
#if defined(NODE_ERROR)
|
#if defined(NODE_ERROR)
|
||||||
#define HTTPCLIENT_ERR(format, ...) NODE_ERR("HTTP client: "format"\n", ##__VA_ARGS__)
|
#define HTTPCLIENT_ERR(format, ...) NODE_ERR("%s"format"\n", log_prefix, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define HTTPCLIENT_ERR(...)
|
#define HTTPCLIENT_ERR(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue