logger: replace hardcoded constant in rtt backend
Replace hardcoded report limit of dropped message by macro. Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
This commit is contained in:
parent
02afc16dcb
commit
9eba380cf7
1 changed files with 3 additions and 2 deletions
|
@ -12,7 +12,8 @@
|
|||
|
||||
#if CONFIG_LOG_BACKEND_RTT_MODE_DROP
|
||||
|
||||
#define DROP_MSG "\nmessages dropped: 99 \r"
|
||||
#define DROP_MAX 99
|
||||
#define DROP_MSG "\nmessages dropped: \r"
|
||||
#define DROP_MSG_LEN (sizeof(DROP_MSG) - 1)
|
||||
|
||||
#else
|
||||
|
@ -109,7 +110,7 @@ static int log_backend_rtt_write_drop(void)
|
|||
}
|
||||
|
||||
if (drop_warn) {
|
||||
int cnt = min(drop_cnt, 99);
|
||||
int cnt = min(drop_cnt, DROP_MAX);
|
||||
|
||||
if (cnt < 10) {
|
||||
line_buf[DROP_MSG_LEN - 2] = ' ';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue