mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-06-02 13:02:41 +08:00
[ulog] support ulog_async_output_enabled
This commit is contained in:
@@ -559,7 +559,8 @@ static void do_output(rt_uint32_t level, const char *tag, rt_bool_t is_raw, cons
|
||||
{
|
||||
#ifdef ULOG_USING_ASYNC_OUTPUT
|
||||
rt_size_t log_buf_size = log_len + sizeof((char)'\0');
|
||||
|
||||
if (ulog.async_enabled)
|
||||
{
|
||||
if (is_raw == RT_FALSE)
|
||||
{
|
||||
rt_rbb_blk_t log_blk;
|
||||
@@ -601,7 +602,10 @@ static void do_output(rt_uint32_t level, const char *tag, rt_bool_t is_raw, cons
|
||||
/* send a notice */
|
||||
rt_sem_release(&ulog.async_notice);
|
||||
}
|
||||
#else
|
||||
|
||||
return;
|
||||
}
|
||||
#endif /* ULOG_USING_ASYNC_OUTPUT */
|
||||
/* is in thread context */
|
||||
if (rt_interrupt_get_nest() == 0)
|
||||
{
|
||||
@@ -618,7 +622,6 @@ static void do_output(rt_uint32_t level, const char *tag, rt_bool_t is_raw, cons
|
||||
ulog_console_backend_output(RT_NULL, level, tag, is_raw, log_buf, log_len);
|
||||
#endif /* ULOG_BACKEND_USING_CONSOLE */
|
||||
}
|
||||
#endif /* ULOG_USING_ASYNC_OUTPUT */
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user