EasyLogger
EasyLogger copied to clipboard
An ultra-lightweight(ROM<1.6K, RAM<0.3k), high-performance C/C++ log library. | 一款超轻量级(ROM<1.6K, RAM<0.3k)、高性能的 C/C++ 日志库
There is a small typo in demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/Include/core_cm3.h, demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/Include/core_cm4.h, demo/non_os/stm32f10x/Libraries/CMSIS_EWARM/Include/core_sc300.h, demo/non_os/stm32f10x/Libraries/CMSIS_RVMDK/CM3/CoreSupport/core_cm3.h, demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/Include/core_cm3.h, demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/Include/core_cm4.h, demo/os/rt-thread/stm32f10x/Libraries/CMSIS_EWARM/Include/core_sc300.h, demo/os/rt-thread/stm32f10x/Libraries/CMSIS_RVMDK/CM3/CoreSupport/core_cm3.h. Should read `smallest` rather than `samllest`.
elog.c 181~185行, elog_output_lock_enabled(true); 和 elog.output_is_locked_before_enable = false; elog.output_is_locked_before_disable = false; 的顺序好像写反了,elog_output_lock_enabled中会校验没有初始化的变量,导致极小概率锁死。我初步测试是这样的
I/main [07-14 16:10:17] Hello EasyLogger! A/main [07-14 16:10:17 pid:1172 tid:13976] (main.c test_elog:86)Hello EasyLogger! E/main [07-14 16:10:17] Hello EasyLogger! W/main [07-14 16:10:17] Hello EasyLogger! I/main [07-14 16:10:17] Hello EasyLogger! 07-14 16:09:35...
..\source\thirdparty\EasyLogger\plugins\file\elog_file.c(29): error: #5: cannot open source input file "unistd.h": No such file or directory
比如我需要再主线程打印日志a.log, 下面新建三个线程打印b.log,c.log.d.log。 而子线程又会调用同一个公用方法,公用方法想要打印到d.log 请问支持这样子吗? 是在每次切换时重新init吗?
问题描述:日志需要上传到云端,云端期望能对日志做分级(fatal/error/warn/debug),因此建议的json格式是这样: ` { logcontent: "这是一条日志", level: "debug" } ` 我个人觉得好像有一丝道理。。 可以在elog_port_output函数中增加增加一个level参数。 ``` // 现在是这样 void elog_port_output(const char *log, size_t size); // 期望变成这样 void elog_port_output(const char *log, size_t size, level_t level);...