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

修改为更为直观的写法

This commit is contained in:
yuxiaojun 2022-12-16 10:06:08 +08:00
parent 20f13ca2c5
commit d2de581c8d

View File

@ -65,9 +65,8 @@ void elog_buf_output(const char *log, size_t size) {
memcpy(log_buf + buf_write_size, log + write_index, write_size);
write_index += write_size;
size -= write_size;
buf_write_size += write_size;
/* output log */
elog_port_output(log_buf, buf_write_size);
elog_port_output(log_buf, ELOG_BUF_OUTPUT_BUF_SIZE);
/* reset write index */
buf_write_size = 0;
} else {