mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-16 10:39:49 +00:00
7.0 refactor
This commit is contained in:
1 parent
34d4fb8cf0
commit
f2fba1d200
838 files changed
+14236
-255316
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "arch.h"
|
||||
#include "config.h"
|
||||
|
||||
#if MG_ENABLE_MGOS
|
||||
#include <common/cs_dbg.h>
|
||||
#else
|
||||
#if MG_ENABLE_LOG
|
||||
#define LOG(level, args) \
|
||||
do { \
|
||||
if (mg_log_prefix((level), __FILE__, __LINE__, __func__)) mg_log args; \
|
||||
} while (0)
|
||||
enum { LL_NONE, LL_ERROR, LL_INFO, LL_DEBUG, LL_VERBOSE_DEBUG };
|
||||
bool mg_log_prefix(int ll, const char *file, int line, const char *fname);
|
||||
void mg_log(const char *fmt, ...) PRINTF_LIKE(1, 2);
|
||||
void mg_log_set(const char *spec);
|
||||
void mg_log_set_callback(void (*fn)(const void *, int, void *), void *param);
|
||||
#else
|
||||
#define LOG(level, args)
|
||||
#endif
|
||||
#endif
|
||||
Reference in new issue
Block a user