Commit c54bc05b authored by Marcel Stör's avatar Marcel Stör
Browse files

Fix macro as suggested in #1548

parent c70dc749
...@@ -10,16 +10,18 @@ ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment