1
0
mirror of https://github.com/armink/EasyLogger.git synced 2025-02-08 09:04:08 +08:00
EasyLogger/demo/os/linux/README.md
KUAN 26ad8f19b8 feature: add filter tag lvl fuction
1. add the  filter tag lvl fuction
2. update the doc about filter tag lvl fuction
2019-11-30 20:18:00 +08:00

27 lines
973 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# linux demo
---
## 1、简介
使用GCC编译。通过 `main.c``test_elog()` 方法来测试日志的输出。已在 `easylogger\inc\elog_cfg.h` 开启异步输出模式。
### 1.1、使用方法
使用前需提前配置好编译环境,配置成功后,执行 make等待编译完成后运行 `out\EasyLoggerLinuxDemo` 即可看到运行结果。
## 2、文件说明
- `easylogger\port\elog_port.c` 移植参考文件
- easylogger\plugins\file\elog_file_port.c File Log功能移植参考文件
## 3、其他功能
可以打开 `main.c` 中的部分注释,来测试以下功能。
- `elog_set_output_enabled(false);` :动态使能或失能日志输出
- `elog_set_filter_lvl(ELOG_LVL_WARN);` :动态设置过滤优先级
- `elog_set_filter_tag("main");` :动态设置过滤标签
- `elog_set_filter_kw("Hello");` :动态设置过滤关键词
- `elog_set_filter_tag_lvl("main", ELOG_LVL_WARN);` :动态设置过滤关键词级别