aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/spdlog/tests/test_systemd.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-10-24 10:19:24 +0200
committerGitHub Enterprise <[email protected]>2025-10-24 10:19:24 +0200
commit0e21e0d57a5da36f2a4fbbd315254b22cd2fbf00 (patch)
treebe7c96101bf9c91615f04412c7bafe156a3d6ac8 /thirdparty/spdlog/tests/test_systemd.cpp
parentchangelog (diff)
downloadzen-0e21e0d57a5da36f2a4fbbd315254b22cd2fbf00.tar.xz
zen-0e21e0d57a5da36f2a4fbbd315254b22cd2fbf00.zip
in-tree spdlog (#602)
move spdlog into the tree to remove dependency on vcpkg::spdlog, to allow diverging from the official version and evolve it to fit better with OTLP logging requirements
Diffstat (limited to 'thirdparty/spdlog/tests/test_systemd.cpp')
-rw-r--r--thirdparty/spdlog/tests/test_systemd.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/thirdparty/spdlog/tests/test_systemd.cpp b/thirdparty/spdlog/tests/test_systemd.cpp
new file mode 100644
index 000000000..e36365741
--- /dev/null
+++ b/thirdparty/spdlog/tests/test_systemd.cpp
@@ -0,0 +1,14 @@
+#include "includes.h"
+#include "spdlog/sinks/systemd_sink.h"
+
+TEST_CASE("systemd", "[all]") {
+ auto systemd_sink = std::make_shared<spdlog::sinks::systemd_sink_st>();
+ spdlog::logger logger("spdlog_systemd_test", systemd_sink);
+ logger.set_level(spdlog::level::trace);
+ logger.trace("test spdlog trace");
+ logger.debug("test spdlog debug");
+ SPDLOG_LOGGER_INFO((&logger), "test spdlog info");
+ SPDLOG_LOGGER_WARN((&logger), "test spdlog warn");
+ SPDLOG_LOGGER_ERROR((&logger), "test spdlog error");
+ SPDLOG_LOGGER_CRITICAL((&logger), "test spdlog critical");
+}