Fixed the issue LOG_HEX no output at asyn mode. (#5721)

This commit is contained in:
guo 2022-03-27 00:53:23 +08:00 committed by GitHub
parent bae1be0f45
commit 2ad6e28237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -753,6 +753,13 @@ void ulog_hexdump(const char *tag, rt_size_t width, rt_uint8_t *buf, rt_size_t s
}
#endif /* ULOG_USING_FILTER */
#ifdef ULOG_USING_ASYNC_OUTPUT
if (ulog.async_rb == RT_NULL)
{
ulog.async_rb = rt_ringbuffer_create(ULOG_ASYNC_OUTPUT_BUF_SIZE);
}
#endif
/* get log buffer */
log_buf = get_log_buf();