Kai
cd93d9c768
add marco for control function
file
and line
fmt output ( #156 )
...
* add marco for control `function` `file` and `line` fmt output
* typo
2024-03-25 22:58:25 +08:00
Ali.L
83d162f947
elog_file: 添加编译宏控制
2024-02-17 17:51:52 +08:00
Ali.L
a26da77cbd
fix: 修正宏定义注释
2024-02-17 17:40:16 +08:00
ji.hb
2245b9560c
【修改】:修改源代码文件属性 去掉可执行属性
...
1. 带有可执行属性会在bash界面显示特殊延时
2. c源代码文件不需要特殊可执行属性
2023-11-15 13:06:05 +08:00
Riggin
8ea3ef9d3d
解决开启异步输出模式,但不启用 POSIX pthread 库时,编译器有warning的问题。
...
警告信息 warning: 'thread_running' defined but not used [-Wunused-variable]
2023-06-28 17:47:00 +08:00
Riggin
ad264f0df6
解决 elog_raw() 的输出无法由 ELOG_OUTPUT_ENABLE总开关 关闭的问题
2023-06-28 17:39:12 +08:00
yuxiaojun
d2de581c8d
修改为更为直观的写法
2022-12-16 10:06:08 +08:00
yuxiaojun
647478e84e
Add assert judgment
2022-12-15 14:40:37 +08:00
yuxiaojun
28727e7ddd
使用字符串需初始化
2022-12-07 16:31:53 +08:00
yuxiaojun
4a6621892b
增加对文件空指针的判断
2022-12-07 16:09:33 +08:00
朱天龙 (Armink)
a1867805a8
Merge branch 'master' of github.com:armink/EasyLogger
...
# Conflicts:
# demo/os/windows/make.bat
2022-10-16 17:51:49 +08:00
朱天龙 (Armink)
01e7b87a72
Merge branch 'master' of gitee.com:Armink/EasyLogger
2022-10-16 17:48:48 +08:00
h3n4l
1600a2b2b3
fix: enable text color default if define macro ELOG_COLOR_ENABLE
2022-08-30 08:56:50 +08:00
Chen Jihang
0869689c3d
fix: 修复在关闭OUTPUT_LOCK的情况下依然会调用elog_port_output_lock函数的bug [issue 122]
...
在elog.c中的elog_get_filter_tag_lvl函数以及elog_set_filter_tag_lvl函数中错误地使用了elog_port_output_lock函数导致在关闭output lock的情况下仍然会锁定输出却无法解锁
解决:将elog_get_filter_tag_lvl和elog_set_filter_tag_lvl函数中的elog_port_output_lock函数改为elog_output_lock函数
issue #122
close #122
2022-07-11 12:18:55 +08:00
FragrantRye
3d95192f58
Change the buf parameter type of elog_hexdump
...
Change the 'buf' parameter type from uint8_t* to const void*.
Signed-off-by: FragrantRye <903465575@qq.com>
2022-06-26 13:10:22 +08:00
guoqi
c8ee635861
更改函数名称及行号得打印顺序(便于vscode直接跳转)
2021-07-28 17:18:58 +08:00
Liuxi
b81819a6b4
elog_set_filter_tag_lvl_default函数的参数由空修改为void,防止编译器报警告
2021-06-27 12:40:59 +08:00
5ooo
55c326acb8
[demo][linux] optimize async log
2021-04-07 18:16:13 +08:00
5ooo
bb20ae32f6
[easylogger] [demo][linux] add deinit for linux
2021-04-01 17:47:24 +08:00
book诗意
e442625088
提高buf为空时的elog_flush() 性能 ( #81 )
...
* 先判断buf中是否有数据,再进行上锁-输出-解锁的操作,避免buf为空时的频繁上/解锁操作
2021-03-11 11:12:03 +08:00
armink
100fd43233
[plugin][file] remove the access function using.
2020-06-27 11:16:54 +08:00
armink
29bc4e5ee5
[plugin/file] remove the posix API in file plugin.
2020-06-12 23:40:26 +08:00
armink
a607e1715b
【修改】软件版本号。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2019-11-30 21:27:51 +08:00
armink
980eac7383
【完善】文档细节。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2019-11-30 21:18:28 +08:00
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
tianlongqin
a9c071359f
change retate function, Solve multi-process problems
...
Signed-off-by: tianlongqin <qtl_linux@153.com>
2019-09-06 11:39:34 +08:00
jq
1362ff7f4e
解决elog_hexdump中数据偏移地址错误的问题
2019-08-03 16:22:32 +08:00
armink
fbdc6c23b0
【更新】软件版本号。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2019-07-29 09:00:56 +08:00
Zhao Chong
bd2281e935
修复异步模式下概率性导致输出日志不完整的问题
...
Summary:
[背景]:异步输出模式开启、断言开启,elog_async.c在初始化时,elog_async_init创建子线程完成后,
子线程处理函数async_output在一开始会对全局变量init_ok进行断言,如果为false,那么就无法进入
后续sem_wait流程,进行结果输出了;而init_ok是在子线程创建完之后,elog_async_init最后才设置
为true的,这样程序的正确执行就取决于父子线程的调度顺序了
[解决办法]:子线程的处理程序中无需对init_ok进行判断,因为在while循环体中sem_wait会保证只有在
有需要输出的内容时,才会触发后续的内容输出过程
2019-07-26 12:28:39 +08:00
armink
6734e930fd
【修正】ELOG_OUTPUT_ENABLE 未定义时存在的编译错误。感谢网友 @mojinpan 的反馈。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2019-03-30 09:26:56 +08:00
armink
79044bcc67
【完善】日志文件循环写入功能。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2019-02-15 17:18:07 +08:00
Jin-W-FS
1507a7b611
Support log-rotate.
...
rotate each xxx.log.n-1 to xxx.log.n(n < local_cfg.max_rotate), and xxx.log to
xxx.log.0 when xxx.log achieves local_cfg.max_size and local_cfg.max_rotate > 0.
2019-02-14 20:57:01 +08:00
armink
afabf352f3
【优化】file 插件代码细节格式,并提取 elog_file_config API。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2019-01-10 22:46:14 +08:00
qintl
cee83af21c
File plugin details processing
...
Signed-off-by: qintl <qintl@yytek.com>
2019-01-10 16:42:46 +08:00
qintl
b3c38630e9
Fix plugin file the structure and format
...
Signed-off-by: qintl <qintl@yytek.com>
2019-01-10 15:27:03 +08:00
qintl
75cd8806b8
add plugin file
...
Signed-off-by: qintl <qintl@yytek.com>
2019-01-10 15:27:03 +08:00
armink
42a50e194c
【优化】代码细节格式。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2019-01-04 22:46:26 +08:00
armink
1986ffca2f
【修复】elog_strcpy 可能存在内存写穿的问题(PS:之前应用层已规避)。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2019-01-04 22:45:58 +08:00
qintl
b0248cff84
elog_hexdump add lvl and tag filter
...
Signed-off-by: qintl <qintl@yytek.com>
2019-01-03 15:33:24 +08:00
benbenshi
af388db710
修改中文编码乱码问题
2018-12-21 02:33:27 -05:00
benbenshi
6235866867
feature:增加hexdump功能
...
1、移植ulog的hexdump功能,验证ok,main.c编译后hexdump输出如下:
D/HEX test: 0000-0010: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ................
D/HEX test: 0010-0020: 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F ................
D/HEX test: 0020-0030: 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F !"#$%&'()*+,-./
D/HEX test: 0030-0040: 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 0123456789:;<=>?
D/HEX test: 0040-0050: 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F @ABCDEFGHIJKLMNO
D/HEX test: 0050-0060: 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F PQRSTUVWXYZ[\]^_
D/HEX test: 0060-0070: 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F `abcdefghijklmno
D/HEX test: 0070-0080: 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F pqrstuvwxyz{|}~.
D/HEX test: 0080-0090: 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F ................
D/HEX test: 0090-00A0: 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F ................
D/HEX test: 00A0-00B0: A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF ................
D/HEX test: 00B0-00C0: B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF ................
D/HEX test: 00C0-00D0: C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF ................
D/HEX test: 00D0-00E0: D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF ................
D/HEX test: 00E0-00F0: E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF ................
D/HEX test: 00F0-0100: F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF ................
2018-12-21 02:29:34 -05:00
armink
8c957b1719
【完善】日志缓冲区溢出检查处理。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2018-08-09 15:09:54 +08:00
armink
2dfba8ee3a
【修复】关键词过滤功能可能过滤脏数据的情况。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2018-08-02 14:17:28 +08:00
XuanZe
808124ae44
[修复]溢出错误
2018-06-04 10:45:01 +08:00
armink
c50a0c9d0f
1、【增加】ELOG_ASYNC_OUTPUT_LVL
宏,可限制仅允许低于该级别日志采用异步输出,详见说明文档。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2017-11-30 20:10:55 +08:00
armink
a7288df94a
1、【完善】Flash 插件,增强可靠性。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2017-05-11 20:20:20 +08:00
armink
abbf1e0f19
1、【增加】log_x 及 assert API,简化用户的书写方式;
...
2、【增加】按产品模块可配置日志输出优先级的功能。
Signed-off-by: armink <armink.ztl@gmail.com>
2017-02-09 11:12:15 +08:00
armink
7a3d4314d1
1、【增加】elog_memcpy 方法,提升了 Flash 插件跨平台的兼容性。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2016-12-19 11:15:23 +08:00
armink
123407ca94
1、【增加】异步按行日志(以换行符结尾)格式输出功能;
...
2、【增加】查找日志级别及标签功能。
Signed-off-by: armink <armink.ztl@gmail.com>
2016-11-26 10:29:30 +08:00
armink
32791cb60f
1、【增加】ELOG_OUTPUT_ENABLE 宏,日志颜色功能可以以静态方法开启或关闭。启用颜色功能必须定义该宏。
...
Signed-off-by: armink <armink.ztl@gmail.com>
2016-11-24 12:28:30 +08:00