1
0
mirror of https://github.com/armink/EasyLogger.git synced 2025-01-19 07:42:52 +08:00

修改中文编码乱码问题

This commit is contained in:
benbenshi 2018-12-21 02:33:27 -05:00
parent 6235866867
commit af388db710

View File

@ -404,7 +404,7 @@ void elog_output(uint8_t level, const char *tag, const char *file, const char *f
if (level > elog.filter.level) {
return;
} else if (!strstr(tag, elog.filter.tag)) { /* tag filter */
//TODO <EFBFBD><EFBFBD><EFBFBD>Կ<EFBFBD><EFBFBD>Dz<EFBFBD><EFBFBD><EFBFBD>KMP<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽƥ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//TODO 可以考虑采用KMP及朴素模式匹配字符串提升性能
return;
}
/* args point to the first variable parameter */
@ -478,7 +478,7 @@ void elog_output(uint8_t level, const char *tag, const char *file, const char *f
}
/* package thread info */
if (get_fmt_enabled(level, ELOG_FMT_LINE)) {
//TODO snprintf<EFBFBD><EFBFBD>Դռ<EFBFBD>ÿ<EFBFBD><EFBFBD>ܽϸߣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż<EFBFBD>
//TODO snprintf资源占用可能较高,待优化
snprintf(line_num, ELOG_LINE_NUM_MAX_LEN, "%ld", line);
log_len += elog_strcpy(log_len, log_buf + log_len, line_num);
}