logging: Initialize backends with autostart flag set
Added check which ensures that only backends with autostart flag set are enabled automatically by the logging. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
e243122c1e
commit
60ca7899c7
1 changed files with 1 additions and 1 deletions
|
@ -236,7 +236,7 @@ static uint32_t activate_foreach_backend(uint32_t mask)
|
||||||
const struct log_backend *backend = log_backend_get(i);
|
const struct log_backend *backend = log_backend_get(i);
|
||||||
|
|
||||||
mask_cpy &= ~BIT(i);
|
mask_cpy &= ~BIT(i);
|
||||||
if (log_backend_is_ready(backend) == 0) {
|
if (backend->autostart && (log_backend_is_ready(backend) == 0)) {
|
||||||
mask &= ~BIT(i);
|
mask &= ~BIT(i);
|
||||||
log_backend_enable(backend,
|
log_backend_enable(backend,
|
||||||
backend->cb->ctx,
|
backend->cb->ctx,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue