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.
This commit is contained in:
icex2 2024-08-15 11:34:31 +02:00
parent 3987ef99ac
commit 71e6b1e29f

View File

@ -5,8 +5,9 @@
#include <windows.h>
#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];