diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 034ff6d..60daf63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,25 @@ env: CARGO_TERM_COLOR: always jobs: + cpp-sdk: + name: Test C++ SDK (${{ matrix.os }}) + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Check out repository + uses: actions/checkout@v7 + + - name: Configure C++ SDK tests + run: cmake -S sdk -B build/cpp-sdk -DCMAKE_BUILD_TYPE=Release + + - name: Build C++ SDK tests + run: cmake --build build/cpp-sdk --config Release + + - name: Test C++ SDK + run: ctest --test-dir build/cpp-sdk -C Release --output-on-failure + build: name: Check, test, and build runs-on: windows-latest @@ -52,6 +71,7 @@ jobs: New-Item -ItemType Directory -Force artifact Copy-Item target\x86_64-pc-windows-msvc\release\bass.dll artifact\ Copy-Item README.md, LICENSE artifact\ + Copy-Item -Recurse sdk artifact\sdk - name: Upload artifact uses: actions/upload-artifact@v7 diff --git a/README.md b/README.md index 03d3481..b74bd39 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,23 @@ Calls such as `log::error!`, `log::warn!`, and `log::info!` then use the modload Logging remains optional for compatibility. Old mods without the bridge continue to load in new modloaders without logging, and new mods continue to load in old modloaders without logging. +##### C++ mods + +For logging from a C++ mod, add `sdk/include` to your include path and define the setup hook in exactly one source file: + +```cpp +#include + +HIGHFLEET_SETUP_LOGGER() + +extern "C" __declspec(dllexport) bool __cdecl init() { + highfleet::logging::info("Ready!"); + return true; +} +``` + +For more details, see the [C++ logging SDK documentation](sdk/README.md). + #### `init() -> bool` The modloader calls this function last. If you return false, the modloader assumes that you have failed to initialize. diff --git a/sdk/.gitignore b/sdk/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/sdk/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt new file mode 100644 index 0000000..75ca484 --- /dev/null +++ b/sdk/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.20) +project(highfleet_cpp_sdk LANGUAGES CXX) + +add_library(highfleet_logging INTERFACE) +target_include_directories(highfleet_logging INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include") +target_compile_features(highfleet_logging INTERFACE cxx_std_11) + +include(CTest) +if(BUILD_TESTING) + add_executable(highfleet_log_test tests/log_test.cpp tests/log_other.cpp) + target_link_libraries(highfleet_log_test PRIVATE highfleet_logging) + set_target_properties(highfleet_log_test PROPERTIES + CXX_STANDARD 11 + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + if(MSVC) + target_compile_options(highfleet_log_test PRIVATE /W4 /WX /permissive-) + else() + target_compile_options(highfleet_log_test PRIVATE -Wall -Wextra -Wpedantic -Werror) + endif() + add_test(NAME logging COMMAND highfleet_log_test) + add_test(NAME optional_callbacks COMMAND highfleet_log_test optional) +endif() diff --git a/sdk/README.md b/sdk/README.md new file mode 100644 index 0000000..6bd81a1 --- /dev/null +++ b/sdk/README.md @@ -0,0 +1,109 @@ +# HighFleet C++ logging SDK + +A C++11 header-only logging API for mods. +Add `sdk/include` to your include path. +Highfleet and the modloader run on x86_64 Windows, so your mod DLL must also be built for x86_64 Windows. + +## Use in a mod + +Put the setup macro at global scope in **exactly one `.cpp` file**: + +```cpp +#include + +HIGHFLEET_SETUP_LOGGER() + +extern "C" __declspec(dllexport) bool __cdecl init() { + highfleet::logging::info("Ready!"); + highfleet::logging::warn("Optional configuration missing"); + return true; +} +``` + +Every other translation unit can include the header and log without repeating the macro. + +Initialize your mod in `init`, where logging is already available. +If you choose to initialize in `DllMain` instead, do not log there: logging is unavailable before setup, and later calls under the loader lock can deadlock. + +## Logging API + +All user-facing names are in `highfleet::logging`: + +- `error(message)`, `warn(message)`, `info(message)`, `debug(message)`, `trace(message)`. +- `enabled(level)`: ask the host before doing expensive message formatting. +- `flush()`: flush the modloader's buffered log output; does nothing before setup. +- `enum class level : std::uint32_t`: error = 1, warn = 2, info = 3, debug = 4, trace = 5. + +```cpp +if (highfleet::logging::enabled(highfleet::logging::level::debug)) { + // Build your diagnostic string here, then pass its c_str() to debug(). +} +``` + +The functions accept UTF-8, NUL-terminated strings, borrow them synchronously, and do not format or allocate. +Keep the string alive until the call returns. +Null strings are treated as empty; embedded NUL bytes terminate the text. +Arbitrary invalid pointers are not made safe, and the SDK does not validate UTF-8. + +For callers that already have diagnostic targets, each named helper also accepts `(target, message)`. +The generic entry point is `log(level, target, message)`, and `enabled(level, target)` accepts a target too. +Targets are forwarded as metadata, but **the host identifies and filters mods by their DLL stem**, not by these caller-controlled strings. +Most mods should just use the message-only helpers. + +## Filtering and output + +The SDK uses the modloader's logging configuration; see [Logging configuration](../README.md#logging-configuration). + +## Host ABI details + +Mods only need the macro and logging functions; they do not implement a logger. +`HIGHFLEET_SETUP_LOGGER()` emits this Windows export: + +```cpp +extern "C" __declspec(dllexport) std::uint32_t __cdecl highfleet_mod_setup_v1( + const highfleet::ffi::HfmHostApiV1* host); +``` + +The raw types in `highfleet::ffi` mirror `crates/highfleet-mod-api/src/ffi.rs`. +The version-1 table carries an opaque context, an optional enabled callback, a required write callback, and an optional flush callback. +Records carry byte-counted UTF-8 views (`HfmStr`), level, size, target/message, and empty source metadata. +No C++ objects, Rust traits, ownership, or strings requiring a shared allocator cross the ABI. + +Setup validates version, size, and required callbacks, then copies the table. +The table itself only needs to live through setup. +Its context and callback code must remain valid and thread-safe for the entire lifetime of mod logging. +Callbacks must not throw or unwind across the C boundary. +Each record and its strings are borrowed only until the synchronous callback returns. + +Installation succeeds once, using an atomic claim followed by release/acquire publication of the immutable copied table. +There is no replacement/uninstall API. +An external-linkage inline function's local static shares state across translation units under C++11. +Calls before publication are safe no-ops. +Setup status codes match Rust: 0 success, 1 null table, 2 unsupported version, 3 short table, 4 missing write callback, 5 already installed; `UINT32_MAX` is reserved for a Rust setup panic. + +C++ and Rust mods use the same `highfleet_mod_setup_v1` export. +Non-Windows builds omit Windows export/calling-convention annotations for tests. + +## Standalone tests + +With CMake 3.20 or later, from the repository root: + +```sh +cmake -S sdk -B build/cpp-sdk +cmake --build build/cpp-sdk --config Release +ctest --test-dir build/cpp-sdk -C Release --output-on-failure +``` + +Or directly with a C++11 compiler: + +```sh +mkdir -p sdk/build +c++ -std=c++11 -Wall -Wextra -Wpedantic -Werror -Isdk/include \ + sdk/tests/log_test.cpp sdk/tests/log_other.cpp -o sdk/build/log_test +sdk/build/log_test +sdk/build/log_test optional +``` + +Both test modes use explicit checks that remain active with `NDEBUG`. +The optional-callback case runs in a separate process because installation is intentionally one-shot. +Tests cover ABI layouts matching Rust's assertions, setup rejection, table copying, synchronous forwarding/context, level values, filtering, flush, UTF-8/null text, and cross-translation-unit state. diff --git a/sdk/include/highfleet/log.hpp b/sdk/include/highfleet/log.hpp new file mode 100644 index 0000000..98c420e --- /dev/null +++ b/sdk/include/highfleet/log.hpp @@ -0,0 +1,198 @@ +#ifndef HIGHFLEET_LOG_HPP +#define HIGHFLEET_LOG_HPP + +#include +#include +#include +#include + +#if defined(_WIN32) +#define HIGHFLEET_LOGGING_CDECL __cdecl +#define HIGHFLEET_LOGGING_EXPORT __declspec(dllexport) +#else +#define HIGHFLEET_LOGGING_CDECL +#define HIGHFLEET_LOGGING_EXPORT +#endif + +namespace highfleet { +namespace ffi { + +constexpr std::uint32_t HFM_HOST_ABI_VERSION_1 = 1; +constexpr std::uint32_t HFM_STATUS_OK = 0; +constexpr std::uint32_t HFM_STATUS_NULL_API = 1; +constexpr std::uint32_t HFM_STATUS_UNSUPPORTED_ABI = 2; +constexpr std::uint32_t HFM_STATUS_API_TOO_SMALL = 3; +constexpr std::uint32_t HFM_STATUS_MISSING_CALLBACK = 4; +constexpr std::uint32_t HFM_STATUS_LOGGER_ALREADY_SET = 5; +constexpr std::uint32_t HFM_STATUS_PANIC = UINT32_MAX; + +struct HfmStr { + const std::uint8_t* ptr; + std::size_t len; +}; + +struct HfmLogRecordV1 { + std::uint32_t struct_size; + std::uint32_t level; + HfmStr target; + HfmStr message; + HfmStr module_path; + HfmStr file; + std::uint32_t line; + std::uint32_t reserved; +}; + +using HfmLogEnabledV1 = std::uint8_t (HIGHFLEET_LOGGING_CDECL *)(void*, std::uint32_t, HfmStr); +using HfmLogWriteV1 = void (HIGHFLEET_LOGGING_CDECL *)(void*, const HfmLogRecordV1*); +using HfmLogFlushV1 = void (HIGHFLEET_LOGGING_CDECL *)(void*); + +struct HfmHostApiV1 { + std::uint32_t abi_version; + std::uint32_t struct_size; + void* context; + HfmLogEnabledV1 log_enabled; + HfmLogWriteV1 log_write; + HfmLogFlushV1 log_flush; +}; + +} // namespace ffi + +namespace logging { + +enum class level : std::uint32_t { + error = 1, + warn = 2, + info = 3, + debug = 4, + trace = 5 +}; + +namespace detail { + +struct logger_state { + std::atomic phase; + ffi::HfmHostApiV1 host; + + logger_state() noexcept : phase(0), host{} {} +}; + +inline logger_state& logger() noexcept { + // External-linkage inline functions share their local static across translation units. + static logger_state state; + return state; +} + +inline const ffi::HfmHostApiV1* installed_host() noexcept { + logger_state& state = logger(); + return state.phase.load(std::memory_order_acquire) == 2 ? &state.host : nullptr; +} + +inline ffi::HfmStr borrow(const char* text) noexcept { + return {reinterpret_cast(text), + text == nullptr ? 0 : std::strlen(text)}; +} + +inline std::uint32_t install_host(const ffi::HfmHostApiV1* host) noexcept { + if (host == nullptr) { + return ffi::HFM_STATUS_NULL_API; + } + if (host->abi_version != ffi::HFM_HOST_ABI_VERSION_1) { + return ffi::HFM_STATUS_UNSUPPORTED_ABI; + } + if (host->struct_size < sizeof(ffi::HfmHostApiV1)) { + return ffi::HFM_STATUS_API_TOO_SMALL; + } + if (host->log_write == nullptr) { + return ffi::HFM_STATUS_MISSING_CALLBACK; + } + detail::logger_state& state = detail::logger(); + unsigned expected = 0; + if (!state.phase.compare_exchange_strong(expected, 1, std::memory_order_relaxed)) { + return ffi::HFM_STATUS_LOGGER_ALREADY_SET; + } + state.host = *host; + // Readers access the immutable table only after publication is complete. + state.phase.store(2, std::memory_order_release); + return ffi::HFM_STATUS_OK; +} + +} // namespace detail + +inline bool enabled(level severity, const char* target = nullptr) { + const ffi::HfmHostApiV1* host = detail::installed_host(); + return host != nullptr && + (host->log_enabled == nullptr || + host->log_enabled(host->context, static_cast(severity), + detail::borrow(target)) != 0); +} + +inline void flush() { + const ffi::HfmHostApiV1* host = detail::installed_host(); + if (host != nullptr && host->log_flush != nullptr) { + host->log_flush(host->context); + } +} + +inline void log(level severity, const char* target, const char* message) { + const ffi::HfmHostApiV1* host = detail::installed_host(); + if (host == nullptr || !enabled(severity, target)) { + return; + } + const ffi::HfmLogRecordV1 record = { + sizeof(ffi::HfmLogRecordV1), static_cast(severity), + detail::borrow(target), detail::borrow(message), + {nullptr, 0}, {nullptr, 0}, 0, 0 + }; + host->log_write(host->context, &record); +} + +inline void error(const char* target, const char* message) { + log(level::error, target, message); +} + +inline void warn(const char* target, const char* message) { + log(level::warn, target, message); +} + +inline void info(const char* target, const char* message) { + log(level::info, target, message); +} + +inline void debug(const char* target, const char* message) { + log(level::debug, target, message); +} + +inline void trace(const char* target, const char* message) { + log(level::trace, target, message); +} + +inline void error(const char* message) { + error(nullptr, message); +} + +inline void warn(const char* message) { + warn(nullptr, message); +} + +inline void info(const char* message) { + info(nullptr, message); +} + +inline void debug(const char* message) { + debug(nullptr, message); +} + +inline void trace(const char* message) { + trace(nullptr, message); +} + +} // namespace logging +} // namespace highfleet + +#define HIGHFLEET_SETUP_LOGGER() \ + extern "C" HIGHFLEET_LOGGING_EXPORT std::uint32_t HIGHFLEET_LOGGING_CDECL \ + highfleet_mod_setup_v1(const ::highfleet::ffi::HfmHostApiV1* host) { \ + return ::highfleet::logging::detail::install_host(host); \ + } + +#endif // HIGHFLEET_LOG_HPP diff --git a/sdk/tests/layout_test.hpp b/sdk/tests/layout_test.hpp new file mode 100644 index 0000000..d80d43b --- /dev/null +++ b/sdk/tests/layout_test.hpp @@ -0,0 +1,39 @@ +#ifndef HIGHFLEET_LAYOUT_TEST_HPP +#define HIGHFLEET_LAYOUT_TEST_HPP + +#include +#include + +namespace layout_test { +using namespace highfleet::ffi; +constexpr std::size_t pointer_size = sizeof(void*); + +static_assert(std::is_standard_layout::value, "C string layout"); +static_assert(std::is_standard_layout::value, "C record layout"); +static_assert(std::is_standard_layout::value, "C host layout"); +static_assert(std::is_trivially_copyable::value, "host table can be copied"); +static_assert(offsetof(HfmStr, ptr) == 0, "string pointer offset"); +static_assert(offsetof(HfmStr, len) == pointer_size, "string length offset"); +static_assert(sizeof(HfmStr) == pointer_size * 2, "string size"); +static_assert(alignof(HfmStr) == pointer_size, "string alignment"); + +static_assert(offsetof(HfmLogRecordV1, struct_size) == 0, "record size offset"); +static_assert(offsetof(HfmLogRecordV1, level) == 4, "record level offset"); +static_assert(offsetof(HfmLogRecordV1, target) == 8, "record target offset"); +static_assert(offsetof(HfmLogRecordV1, message) == 8 + pointer_size * 2, "record message offset"); +static_assert(offsetof(HfmLogRecordV1, module_path) == 8 + pointer_size * 4, "record module offset"); +static_assert(offsetof(HfmLogRecordV1, file) == 8 + pointer_size * 6, "record file offset"); +static_assert(offsetof(HfmLogRecordV1, line) == 8 + pointer_size * 8, "record line offset"); +static_assert(offsetof(HfmLogRecordV1, reserved) == 12 + pointer_size * 8, "record reserved offset"); +static_assert(sizeof(HfmLogRecordV1) == 16 + pointer_size * 8, "record size"); + +static_assert(offsetof(HfmHostApiV1, abi_version) == 0, "host version offset"); +static_assert(offsetof(HfmHostApiV1, struct_size) == 4, "host size offset"); +static_assert(offsetof(HfmHostApiV1, context) == 8, "host context offset"); +static_assert(offsetof(HfmHostApiV1, log_enabled) == 8 + pointer_size, "host enabled offset"); +static_assert(offsetof(HfmHostApiV1, log_write) == 8 + pointer_size * 2, "host write offset"); +static_assert(offsetof(HfmHostApiV1, log_flush) == 8 + pointer_size * 3, "host flush offset"); +static_assert(sizeof(HfmHostApiV1) == 8 + pointer_size * 4, "host size"); +} // namespace layout_test + +#endif diff --git a/sdk/tests/log_other.cpp b/sdk/tests/log_other.cpp new file mode 100644 index 0000000..06d8496 --- /dev/null +++ b/sdk/tests/log_other.cpp @@ -0,0 +1,5 @@ +#include + +void log_from_other_translation_unit() { + highfleet::logging::log(highfleet::logging::level::debug, "mod", "other TU"); +} diff --git a/sdk/tests/log_test.cpp b/sdk/tests/log_test.cpp new file mode 100644 index 0000000..9269b5f --- /dev/null +++ b/sdk/tests/log_test.cpp @@ -0,0 +1,177 @@ +#include +#include "layout_test.hpp" + +#include +#include +#include + +HIGHFLEET_SETUP_LOGGER() + +void log_from_other_translation_unit(); + +namespace { + +struct Capture { + unsigned writes = 0; + unsigned flushes = 0; + bool allow = true; + unsigned filter_calls = 0; + std::uint32_t filter_level = 0; + std::string filter_target; + std::uint32_t severity = 0; + std::string target; + std::string message; +}; + +void require(bool condition, const char* description) { + if (!condition) { + std::fprintf(stderr, "FAIL: %s\n", description); + std::exit(EXIT_FAILURE); + } +} + +void HIGHFLEET_LOGGING_CDECL discard(void*, const highfleet::ffi::HfmLogRecordV1*) {} + +void HIGHFLEET_LOGGING_CDECL flush_host(void* context) { + ++static_cast(context)->flushes; +} + +std::uint8_t HIGHFLEET_LOGGING_CDECL filter( + void* context, std::uint32_t severity, highfleet::ffi::HfmStr target) { + Capture& capture = *static_cast(context); + ++capture.filter_calls; + capture.filter_level = severity; + capture.filter_target = target.len == 0 ? "" : + std::string(reinterpret_cast(target.ptr), target.len); + return capture.allow ? 7 : 0; +} + +void HIGHFLEET_LOGGING_CDECL write(void* context, const highfleet::ffi::HfmLogRecordV1* record) { + Capture& capture = *static_cast(context); + ++capture.writes; + capture.severity = record->level; + capture.target = record->target.len == 0 ? "" : + std::string(reinterpret_cast(record->target.ptr), record->target.len); + capture.message = record->message.len == 0 ? "" : + std::string(reinterpret_cast(record->message.ptr), record->message.len); + require(record->struct_size == sizeof(*record), "record advertises its size"); + require(record->reserved == 0, "reserved field is zero"); + require(record->module_path.len == 0, "absent module path is empty"); + require(record->file.len == 0, "absent file is empty"); + require(record->line == 0, "absent source line is zero"); +} + +void copies_host_table(Capture& capture) { + using namespace highfleet::ffi; + HfmHostApiV1 host = {1, sizeof(HfmHostApiV1), &capture, &filter, &write, &flush_host}; + require(highfleet_mod_setup_v1(&host) == HFM_STATUS_OK, "valid table installs"); + host.log_write = &discard; + host.context = nullptr; +} + +void forwards_records_across_translation_units(Capture& capture) { + log_from_other_translation_unit(); + require(capture.writes == 1, "copied host table forwards from another translation unit"); + require(capture.severity == 4, "debug uses ABI level 4"); + require(capture.target == "mod", "target is forwarded"); + require(capture.message == "other TU", "message is forwarded"); +} + +void checks_host_filter(Capture& capture) { + using namespace highfleet::logging; + require(enabled(level::trace, "custom"), "nonzero host result enables logging"); + require(capture.filter_level == 5, "enabled passes the ABI level"); + require(capture.filter_target == "custom", "enabled passes the target"); + const unsigned previous_writes = capture.writes; + capture.allow = false; + require(!enabled(level::info, "mod"), "zero host result disables logging"); + info("mod", "suppressed"); + require(capture.writes == previous_writes, "disabled records are not written"); + capture.allow = true; +} + +void forwards_message_only_helpers(Capture& capture) { + using log_function = void (*)(const char*); + const log_function helpers[] = { + highfleet::logging::error, highfleet::logging::warn, highfleet::logging::info, + highfleet::logging::debug, highfleet::logging::trace + }; + for (std::uint32_t i = 0; i < 5; ++i) { + const unsigned before = capture.writes; + helpers[i](u8"hello \u2603"); + require(capture.writes == before + 1, "message-only helper writes one record"); + require(capture.severity == i + 1, "helper forwards its numeric level"); + require(capture.target.empty(), "message-only helper uses an empty target"); + require(capture.message == u8"hello \u2603", "message-only helper preserves UTF-8"); + } +} + +void null_strings_are_empty(Capture& capture) { + highfleet::logging::info(nullptr, nullptr); + require(capture.target.empty(), "null target is empty"); + require(capture.message.empty(), "null message is empty"); +} + +void cannot_replace_installed_host(Capture& capture) { + using namespace highfleet::ffi; + HfmHostApiV1 replacement = {1, sizeof(HfmHostApiV1), nullptr, nullptr, &discard, nullptr}; + require(highfleet_mod_setup_v1(&replacement) == HFM_STATUS_LOGGER_ALREADY_SET, + "setup can succeed only once"); + const unsigned before = capture.writes; + highfleet::logging::info("still installed"); + require(capture.writes == before + 1, "failed reinstall preserves installed host"); +} + +void optional_callbacks_may_be_absent(Capture& capture) { + using namespace highfleet::ffi; + HfmHostApiV1 host = {1, sizeof(HfmHostApiV1), &capture, nullptr, &write, nullptr}; + require(highfleet_mod_setup_v1(&host) == HFM_STATUS_OK, "optional callbacks may be null"); + require(highfleet::logging::enabled(highfleet::logging::level::trace), + "missing filter enables every level"); + highfleet::logging::trace("without optional callbacks"); + require(capture.writes == 1, "missing filter does not suppress records"); + highfleet::logging::flush(); + require(capture.flushes == 0, "missing flush is a no-op"); +} + +void rejects_invalid_host_tables() { + using namespace highfleet::ffi; + require(highfleet_mod_setup_v1(nullptr) == HFM_STATUS_NULL_API, "rejects null table"); + HfmHostApiV1 host = {99, sizeof(HfmHostApiV1), nullptr, nullptr, &discard, nullptr}; + require(highfleet_mod_setup_v1(&host) == HFM_STATUS_UNSUPPORTED_ABI, + "rejects unsupported version"); + host.abi_version = HFM_HOST_ABI_VERSION_1; + host.struct_size = 8; + require(highfleet_mod_setup_v1(&host) == HFM_STATUS_API_TOO_SMALL, "rejects short table"); + host.struct_size = sizeof(HfmHostApiV1); + host.log_write = nullptr; + require(highfleet_mod_setup_v1(&host) == HFM_STATUS_MISSING_CALLBACK, + "rejects missing required callback"); +} + +} // namespace + +int main(int argc, char** argv) { + rejects_invalid_host_tables(); + Capture capture; + require(!highfleet::logging::enabled(highfleet::logging::level::info), + "logging is disabled before setup"); + highfleet::logging::flush(); + highfleet::logging::info("mod", "before setup"); + require(capture.writes == 0, "logging before setup is a no-op"); + if (argc == 2 && std::string(argv[1]) == "optional") { + optional_callbacks_may_be_absent(capture); + std::puts("SDK optional callback tests passed"); + return EXIT_SUCCESS; + } + require(argc == 1, "unknown test argument"); + copies_host_table(capture); + forwards_records_across_translation_units(capture); + checks_host_filter(capture); + highfleet::logging::flush(); + require(capture.flushes == 1, "flush forwards host context"); + forwards_message_only_helpers(capture); + null_strings_are_empty(capture); + cannot_replace_installed_host(capture); + std::puts("SDK logging tests passed"); +}