mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-22 11:36:21 +00:00
Implement sending stdout and stderr to MQTT topics
Configured via `debug.std{out,err}_topic`
PUBLISHED_FROM=66c581c38c5039aa9ecc406f8aac0b7e3c6541fc
This commit is contained in:
1 parent
ddef065493
commit
0ea3cdd228
2 files changed
+41
-31
No files matched your search
@@ -40,22 +40,22 @@ void cs_log_set_level(enum cs_log_level level);
|
||||
|
||||
void cs_log_set_file(FILE *file);
|
||||
|
||||
extern enum cs_log_level cs_log_level;
|
||||
extern enum cs_log_level cs_log_threshold;
|
||||
void cs_log_print_prefix(const char *func);
|
||||
void cs_log_printf(const char *fmt, ...);
|
||||
|
||||
#define LOG(l, x) \
|
||||
if (cs_log_level >= l) { \
|
||||
if (cs_log_threshold >= l) { \
|
||||
cs_log_print_prefix(__func__); \
|
||||
cs_log_printf x; \
|
||||
}
|
||||
|
||||
#ifndef CS_NDEBUG
|
||||
|
||||
#define DBG(x) \
|
||||
if (cs_log_level >= LL_VERBOSE_DEBUG) { \
|
||||
cs_log_print_prefix(__func__); \
|
||||
cs_log_printf x; \
|
||||
#define DBG(x) \
|
||||
if (cs_log_threshold >= LL_VERBOSE_DEBUG) { \
|
||||
cs_log_print_prefix(__func__); \
|
||||
cs_log_printf x; \
|
||||
}
|
||||
|
||||
#else /* NDEBUG */
|
||||
|
||||
Reference in new issue
Block a user