1
0
mirror of https://github.com/armink/EasyLogger.git synced 2025-01-31 21:42:53 +08:00

Merge pull request #35 from tianlongqin/qintl

elog_hexdump add lvl and tag filter
This commit is contained in:
朱天龙 (Armink) 2019-01-04 10:04:36 +08:00 committed by GitHub
commit 2126c51332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -689,6 +689,14 @@ void elog_hexdump(const char *name, uint8_t width, uint8_t *buf, uint16_t size)
return;
}
/* level filter */
if (ELOG_LVL_DEBUG > elog.filter.level) {
return;
} else if (!strstr(name, elog.filter.tag)) { /* tag filter */
//TODO 可以考虑采用KMP及朴素模式匹配字符串提升性能
return;
}
/* lock output */
elog_output_lock();