samples: syslog_net: use utility function for backend init
log_backend_init() does the exact same thing, but shorter. Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
This commit is contained in:
parent
b923f962aa
commit
52dfd528b8
@ -36,10 +36,7 @@ void main(void)
|
||||
const struct log_backend *backend = log_backend_net_get();
|
||||
|
||||
if (!log_backend_is_active(backend)) {
|
||||
if (backend->api->init != NULL) {
|
||||
backend->api->init(backend);
|
||||
}
|
||||
|
||||
log_backend_init(backend);
|
||||
log_backend_enable(backend, backend->cb->ctx, CONFIG_LOG_MAX_LEVEL);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user