diff --git a/src/main/core/log-bt-ext.c b/src/main/core/log-bt-ext.c index ca2d5bd..8492caa 100644 --- a/src/main/core/log-bt-ext.c +++ b/src/main/core/log-bt-ext.c @@ -8,6 +8,7 @@ #include "core/log-sink-file.h" #include "core/log-sink-list.h" #include "core/log-sink-mutex.h" +#include "core/log-sink-null.h" #include "core/log-sink-std.h" // so we can log data dumps of rs232 streams without crashing @@ -15,6 +16,18 @@ // 64 kb * 64 = 4 MB for logging total #define CORE_LOG_BT_EXT_ASYNC_QUEUE_LENGTH 64 +void core_log_bt_ext_init_with_null() +{ + core_log_sink_t sink; + + core_log_sink_null_open(&sink); + + // Size doesn't matter (but must be valid) + // logger is entirely disabled + core_log_bt_init(1024, &sink); + core_log_bt_level_set(CORE_LOG_BT_LOG_LEVEL_OFF); +} + void core_log_bt_ext_init_with_stdout() { core_log_sink_t sink; diff --git a/src/main/core/log-bt-ext.h b/src/main/core/log-bt-ext.h index 094fcf1..50f436a 100644 --- a/src/main/core/log-bt-ext.h +++ b/src/main/core/log-bt-ext.h @@ -4,6 +4,8 @@ #include #include +void core_log_bt_ext_init_with_null(); + /** * Helper to setup the bemanitools log implementation with a stdout sink. */