解决 elog_raw() 的输出无法由 ELOG_OUTPUT_ENABLE总开关 关闭的问题

pull/142/head
Riggin 3 years ago
parent e01ac30115
commit ad264f0df6

@ -73,6 +73,7 @@ extern "C" {
#endif
#ifndef ELOG_OUTPUT_ENABLE
#define elog_raw(...)
#define elog_assert(tag, ...)
#define elog_error(tag, ...)
#define elog_warn(tag, ...)
@ -80,6 +81,7 @@ extern "C" {
#define elog_debug(tag, ...)
#define elog_verbose(tag, ...)
#else /* ELOG_OUTPUT_ENABLE */
#define elog_raw(...) elog_raw_output(__VA_ARGS__)
#if ELOG_OUTPUT_LVL >= ELOG_LVL_ASSERT
#define elog_assert(tag, ...) \
elog_output(ELOG_LVL_ASSERT, tag, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__)
@ -191,7 +193,7 @@ void elog_set_filter_tag(const char *tag);
void elog_set_filter_kw(const char *keyword);
void elog_set_filter_tag_lvl(const char *tag, uint8_t level);
uint8_t elog_get_filter_tag_lvl(const char *tag);
void elog_raw(const char *format, ...);
void elog_raw_output(const char *format, ...);
void elog_output(uint8_t level, const char *tag, const char *file, const char *func,
const long line, const char *format, ...);
void elog_output_lock_enabled(bool enabled);

@ -503,7 +503,7 @@ uint8_t elog_get_filter_tag_lvl(const char *tag)
* @param format output format
* @param ... args
*/
void elog_raw(const char *format, ...) {
void elog_raw_output(const char *format, ...) {
va_list args;
size_t log_len = 0;
int fmt_result;

Loading…
Cancel
Save