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

1、【完善】日志溢出处理。

Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
armink 2016-10-12 15:46:54 +08:00
parent 43e1955c5e
commit c74837f75c
3 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015 Armink (armink.ztl@gmail.com)
Copyright (c) 2015-2016 Armink (armink.ztl@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@ -74,7 +74,7 @@ extern "C" {
#define ELOG_LVL_TOTAL_NUM 6
/* EasyLogger software version number */
#define ELOG_SW_VERSION "1.05.13"
#define ELOG_SW_VERSION "1.10.12"
/* EasyLogger assert for developer. */
#ifdef ELOG_ASSERT_ENABLE

View File

@ -1,7 +1,7 @@
/*
* This file is part of the EasyLogger Library.
*
* Copyright (c) 2015, Armink, <armink.ztl@gmail.com>
* Copyright (c) 2015-2016, Armink, <armink.ztl@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -329,8 +329,9 @@ void elog_output(uint8_t level, const char *tag, const char *file, const char *f
log_len += elog_strcpy(log_len, log_buf + log_len, ELOG_NEWLINE_SIGN);
} else {
log_len = ELOG_BUF_SIZE;
/* copy newline sign */
strcpy(log_buf - newline_len, ELOG_NEWLINE_SIGN);
strcpy(log_buf + ELOG_BUF_SIZE - newline_len, ELOG_NEWLINE_SIGN);
}
/* output log */