From 2d5179ba7debf5569c5b35b61e92c88267b49da2 Mon Sep 17 00:00:00 2001 From: shannonbooth <35911232+shannonbooth@users.noreply.github.com> Date: Tue, 24 Oct 2023 08:49:01 +1300 Subject: [PATCH] sinks: Make syslog_sink.h's syslog_prio_from_level protected (#2918) To allow for using this function from a derived sink. --- include/spdlog/sinks/syslog_sink.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/spdlog/sinks/syslog_sink.h b/include/spdlog/sinks/syslog_sink.h index bfc16453..a2df3b44 100644 --- a/include/spdlog/sinks/syslog_sink.h +++ b/include/spdlog/sinks/syslog_sink.h @@ -61,19 +61,19 @@ protected: void flush_() override {} bool enable_formatting_ = false; -private: - using levels_array = std::array; - levels_array syslog_levels_; - // must store the ident because the man says openlog might use the pointer as - // is and not a string copy - const std::string ident_; - // // Simply maps spdlog's log level to syslog priority level. // int syslog_prio_from_level(const details::log_msg &msg) const { return syslog_levels_.at(static_cast(msg.level)); } + +private: + using levels_array = std::array; + levels_array syslog_levels_; + // must store the ident because the man says openlog might use the pointer as + // is and not a string copy + const std::string ident_; }; using syslog_sink_mt = syslog_sink;