Skip to content

Commit 2d5179b

Browse files
authored
sinks: Make syslog_sink.h's syslog_prio_from_level protected (#2918)
To allow for using this function from a derived sink.
1 parent ff205fd commit 2d5179b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/spdlog/sinks/syslog_sink.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ class syslog_sink : public base_sink<Mutex> {
6161
void flush_() override {}
6262
bool enable_formatting_ = false;
6363

64-
private:
65-
using levels_array = std::array<int, 7>;
66-
levels_array syslog_levels_;
67-
// must store the ident because the man says openlog might use the pointer as
68-
// is and not a string copy
69-
const std::string ident_;
70-
7164
//
7265
// Simply maps spdlog's log level to syslog priority level.
7366
//
7467
int syslog_prio_from_level(const details::log_msg &msg) const {
7568
return syslog_levels_.at(static_cast<levels_array::size_type>(msg.level));
7669
}
70+
71+
private:
72+
using levels_array = std::array<int, 7>;
73+
levels_array syslog_levels_;
74+
// must store the ident because the man says openlog might use the pointer as
75+
// is and not a string copy
76+
const std::string ident_;
7777
};
7878

7979
using syslog_sink_mt = syslog_sink<std::mutex>;

0 commit comments

Comments
 (0)