samples: syslog_net: correctly late-initialize log backend
log_backend_activate() does not assign the backend id (backend->ctx->id), which is required for runtime filtering. Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
This commit is contained in:
parent
916e02563c
commit
b923f962aa
|
@ -10,6 +10,7 @@ LOG_MODULE_REGISTER(net_syslog, LOG_LEVEL_DBG);
|
|||
#include <zephyr/kernel.h>
|
||||
|
||||
#include <zephyr/logging/log_backend.h>
|
||||
#include <zephyr/logging/log_ctrl.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -39,7 +40,7 @@ void main(void)
|
|||
backend->api->init(backend);
|
||||
}
|
||||
|
||||
log_backend_activate(backend, NULL);
|
||||
log_backend_enable(backend, backend->cb->ctx, CONFIG_LOG_MAX_LEVEL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue