diff --git a/tests/test_systemd.cpp b/tests/test_systemd.cpp index a75bc765..0909082c 100644 --- a/tests/test_systemd.cpp +++ b/tests/test_systemd.cpp @@ -1,35 +1,13 @@ #include "includes.h" #include -namespace { -const char *tested_logger_name = "main"; -} +TEST_CASE("systemd", "[all]") +{ + auto systemd_sink = std::make_shared(); + systemd_sink->set_level(spdlog::level::level_enum::err); + spdlog::logger logger("spdlog_systemd_test", systemd_sink); -void run(spdlog::logger &logger) { logger.debug("test debug"); logger.error("test error"); logger.info("test info"); } - -// std::shared_ptr create_stdout_and_systemd_logger( -// std::string name="", -// spdlog::level::level_enum level_stdout=spdlog::level::level_enum::debug, -// spdlog::level::level_enum level_systemd=spdlog::level::level_enum::err -// ) { -// auto console_sink = std::make_shared(); -// console_sink->set_level(level_stdout); -// auto systemd_sink = std::make_shared(); -// systemd_sink->set_level(level_systemd); -// return std::make_shared(name, {console_sink, systemd_sink}); - -// } - -TEST_CASE("systemd", "[all]") -{ - auto console_sink = std::make_shared(); - console_sink->set_level(spdlog::level::level_enum::debug); - auto systemd_sink = std::make_shared(); - systemd_sink->set_level(spdlog::level::level_enum::err); - spdlog::logger logger("spdlog_systemd_test", {console_sink, systemd_sink}); - run(logger); -}