logging: add networking syst backend support.
add networking syst backend support. Fixes: #19841. Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This commit is contained in:
parent
211d5beaad
commit
73b83ed8b1
2 changed files with 12 additions and 2 deletions
|
@ -492,6 +492,12 @@ config LOG_BACKEND_NET_MAX_BUF_SIZE
|
|||
IPv6 the size is 1180 octets. As each buffer will use RAM, the value
|
||||
should be selected so that typical messages will fit the buffer.
|
||||
|
||||
config LOG_BACKEND_NET_SYST_ENABLE
|
||||
bool "Enable networking syst backend"
|
||||
depends on LOG_MIPI_SYST_ENABLE
|
||||
help
|
||||
When enabled backend is using networking to output syst format logs.
|
||||
|
||||
endif # LOG_BACKEND_NET
|
||||
|
||||
config LOG_BACKEND_SHOW_COLOR
|
||||
|
|
|
@ -185,7 +185,9 @@ static void send_output(const struct log_backend *const backend,
|
|||
|
||||
log_output_msg_process(&log_output, msg,
|
||||
LOG_OUTPUT_FLAG_FORMAT_SYSLOG |
|
||||
LOG_OUTPUT_FLAG_TIMESTAMP);
|
||||
LOG_OUTPUT_FLAG_TIMESTAMP |
|
||||
(IS_ENABLED(CONFIG_LOG_BACKEND_NET_SYST_ENABLE) ?
|
||||
LOG_OUTPUT_FLAG_FORMAT_SYST : 0));
|
||||
|
||||
log_msg_put(msg);
|
||||
}
|
||||
|
@ -217,7 +219,9 @@ static void sync_string(const struct log_backend *const backend,
|
|||
const char *fmt, va_list ap)
|
||||
{
|
||||
u32_t flags = LOG_OUTPUT_FLAG_LEVEL | LOG_OUTPUT_FLAG_FORMAT_SYSLOG |
|
||||
LOG_OUTPUT_FLAG_TIMESTAMP;
|
||||
LOG_OUTPUT_FLAG_TIMESTAMP |
|
||||
(IS_ENABLED(CONFIG_LOG_BACKEND_NET_SYST_ENABLE) ?
|
||||
LOG_OUTPUT_FLAG_FORMAT_SYST : 0);
|
||||
u32_t key;
|
||||
|
||||
if (!net_init_done && do_net_init() == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue