From 71e6b1e29fbf21223df91d747e54d9ad4cbcc523 Mon Sep 17 00:00:00 2001 From: icex2 Date: Thu, 15 Aug 2024 11:34:31 +0200 Subject: [PATCH] fix: bootstrapping with logger on extiotest Missing the core_boot setup and incorrect order when setting the api. This must come after initializing the actual logging system. --- src/main/extiotest/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/extiotest/main.c b/src/main/extiotest/main.c index 533b826..2cc9f87 100644 --- a/src/main/extiotest/main.c +++ b/src/main/extiotest/main.c @@ -5,8 +5,9 @@ #include +#include "core/boot.h" #include "core/log-bt.h" -#include "core/log-sink-std.h" +#include "core/log-bt-ext.h" #include "iface-core/log.h" @@ -14,7 +15,6 @@ int main(int argc, char **argv) { - core_log_sink_t log_sink; HRESULT hr; const char *port; HANDLE handle; @@ -26,10 +26,10 @@ int main(int argc, char **argv) fprintf(stderr, " COM_PORT: For example COM1\n"); } - core_log_bt_core_api_set(); + core_boot("extiotest"); - core_log_sink_std_err_open(true, &log_sink); - core_log_bt_init(&log_sink); + core_log_bt_ext_init_with_stderr(); + core_log_bt_core_api_set(); core_log_bt_level_set(CORE_LOG_BT_LOG_LEVEL_MISC); port = argv[1];