2019-03-14 23:20:58 +08:00
|
|
|
#include "includes.h"
|
2019-06-28 22:29:52 +08:00
|
|
|
#include "spdlog/sinks/systemd_sink.h"
|
2019-03-14 23:20:58 +08:00
|
|
|
|
2023-09-25 21:05:07 +08:00
|
|
|
TEST_CASE("systemd", "[all]") {
|
2019-03-14 23:20:58 +08:00
|
|
|
auto systemd_sink = std::make_shared<spdlog::sinks::systemd_sink_st>();
|
2019-03-22 20:16:16 +08:00
|
|
|
spdlog::logger logger("spdlog_systemd_test", systemd_sink);
|
2023-09-23 22:59:51 +08:00
|
|
|
logger.set_level(spdlog::level::trace);
|
2019-06-28 22:29:52 +08:00
|
|
|
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");
|
2019-03-14 23:20:58 +08:00
|
|
|
}
|