kamcheungting-db opened a new pull request, #726: URL: https://github.com/apache/iceberg-cpp/pull/726
## What Part 5 of the Iceberg logger stack (stacked on #725). Adds `SpdLogger` and makes spdlog an **optional** dependency. - `SpdLogger` forwards the pre-formatted message + source location to `spdlog::logger`; maps levels (`critical` for both `kCritical` and `kFatal` — the process abort stays in the macro layer). **Synchronous only** for now (spdlog's `source_loc` holds raw pointers unsafe for async). Lives in `logging/internal/` and is **not installed** — applications get it via the default logger or the `"spdlog"` registry entry, never by constructing it directly. - spdlog is now behind **`option(ICEBERG_SPDLOG ON)`**: ON → it's the default backend and the dependency/link are pulled in; OFF → the core library has **no** spdlog dependency and `CerrLogger` is the default. This supersedes the unconditional spdlog link restored by the #459 revert. Selection rides on the `.cc`-only generated `config.h` (`ICEBERG_HAS_SPDLOG`), so the public headers stay backend-agnostic. ## Testing Compiled and run with `clang++ -std=c++23 -stdlib=libc++` (clang 18) against spdlog v1.15.3 (`SPDLOG_USE_STD_FORMAT`) — 31 tests pass, including the 4 `SpdLoggerTest` cases (forwards to sink, braces not interpreted as format, critical+fatal emit). The `ICEBERG_SPDLOG=OFF` path was verified separately (34 tests); the spdlog test compiles to nothing when the backend is off. This pull request and its description were written by Isaac. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
