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

Merge pull request #131 from slark-yuxj/master

修改为更为直观的写法
This commit is contained in:
朱天龙 (Armink) 2022-12-16 13:12:05 +08:00 committed by GitHub
commit 4fecb2b478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {