将rt-thread\examples\ulog_example.c 拷贝至 rt-thread\bsp\qemu-vexpress-a9\applications 文件夹下 执行scons 命令并等待编译完成 运行qemu.bat 来打开 RT-Thread 的 qemu 模拟器 输入ulog_example 命令,即可看到 ulog 例程运行结果,大致效果如下图 ulog 异步例程 大家如果细心观察可以发现,开启异步模式后,这一...
下面将以 ulog 例程进行介绍,打开 rt-thread\examples\ulog_example.c 可以看到,顶部有定义该文件的标签及静态优先级。 #define LOG_TAG "example"#define LOG_LVL LOG_LVL_DBG#include<ulog.h> 在void ulog_example(void) 函数中有使用 LOG_X API ,大致如下: /* output different level log by LOG_X AP...
各个标签(模块)对应日志的输出级别也支持在运行时动态调整,详见《RT-Thread ulog 日志组件应用笔记 - 进阶篇》。 标签的定义方法 参见rt-thread\examples\ulog_example.c ulog 例程文件,在文件顶部有定义 LOG_TAG 宏: 1#define LOG_TAG "example" //该模块对应的标签。不定义时,默认:NO_TAG 2#define LOG_LV...
将rt-thread\examples\ulog_example.c 拷贝至 rt-thread\bsp\qemu-vexpress-a9\applications 文件夹下 执行scons 命令并等待编译完成 运行qemu.bat 来打开 RT-Thread 的 qemu 模拟器 输入ulog_example 命令,即可看到 ulog 例程运行结果,大致效果如下图 ulog 异步例程 大家如果细心观察可以发现,开启异步模式后,这一...
将rt-thread\examples\ulog_example.c拷贝至rt-thread\bsp\qemu-vexpress-a9\applications文件夹下 在Env 中进入rt-thread\bsp\qemu-vexpress-a9目录 确定之前已执行过 ulog 的配置后,执行scons命令并等待编译完成 运行qemu.bat来打开 RT-Thread 的 qemu 模拟器 ...
Open rt-thread\examples\ulog_example.c and you can see that there are labels and static priorities defined at the top.#define LOG_TAG "example" #define LOG_LVL LOG_LVL_DBG #include <ulog.h>The LOG_X API is used in the void ulog_example(void) function, which is roughly as follows:...
各个标签(模块)对应日志的输出级别也支持在运行时动态调整,详见《RT- Thread ulog 日志组件应用笔记- 进阶篇》。 3.4.2. 标签的定义方法 参见 rt-thread\examples\ulog_example.c ulog 例程文件,在文件顶部有定义 LOG_TAG 宏: #define LOG_TAG example //该模块对应的标签。不定义时, 默认:NO_TAG #define ...
RT-Thread一直缺少小巧、实用的日志组件,而 ulog 的诞生补全了这块的短板。今天,它将作为 RT-Thread 的基础组件被开源出来,让我们的开发者也能用上简洁易用的日志系统,提高开发效率。 ulog 介绍 ulog 是一个非常简洁、易用的 C/C++日志组件,第一个字母 u 代表 μ,即微型的意思。它能做到最低ROM<1K, RAM<...
rtdbg 是 RT-Thread 早期的日志头文件,当前 rtdbg 已完成无缝对接ulog ,开启 ulog 后,旧项目中使用 rtdbg 的代码无需做任何修改,即可使用 ulog 完成日志输出。 elog 是 EasyLogger 的简称,对于 elog 来说,ulog 能完全做到 API 层面的兼容。使用时,只需要将旧项目源代码中的#include <elog.h>更换为#include...
RT-Thread ulog 是一个专为 RT-Thread 操作系统设计的超轻量级日志组件。其名称中的 "u" 代表微型(μ),强调其小巧的体积和高效的资源利用。ulog 日志组件旨在提供一个简洁、易用且功能全面的日志系统,帮助开发者在软件调试、维护、性能分析、系统监控和故障预警等方面提供强有力的支持。 2. 描述rtthread ulog日...