代码拉取完成,页面将自动刷新
elog 是一个用于嵌入式设备的微小 log 输出插件,代码量极小,非常适合用于资源受限的嵌入式设备,当然也同样支持多线程设备。
elog_init(LOG_TRACE, buff, sizeof(buff), elog_user_output1);
elog_set_global_level(LOG_INFO);
elog_add_terminal("lux1", LOG_NOTICE, elog_user_output2);
ELOG_WARN("hello world5");
ELOG_MDU_WARN("lux1","hello world7");
#include "elog.h"
void elog_user_output1(const char *str)
{
printf(" %s", str);
}
void elog_user_output2(const char *str)
{
printf(" %s", str);
}
int main(void)
{
uint8_t buff[128] = {0};
elog_init(LOG_TRACE, buff, sizeof(buff), elog_user_output1);
elog_set_global_level(LOG_INFO);
elog_add_terminal("lux1", LOG_NOTICE, elog_user_output2);
ELOG_TRACE("hello world1");
ELOG_DEBUG("hello world2");
ELOG_INFO("hello world3");
ELOG_NOTICE("hello world4");
ELOG_WARN("hello world5");
ELOG_ERROR("hello world6");
ELOG_MDU_WARN("lux1","hello world7");
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。