mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-27 07:14:12 +08:00
parent
c3aed4b683
commit
eeb22c13bb
@ -64,13 +64,14 @@ protected:
|
|||||||
//
|
//
|
||||||
// Simply maps spdlog's log level to syslog priority level.
|
// Simply maps spdlog's log level to syslog priority level.
|
||||||
//
|
//
|
||||||
int syslog_prio_from_level(const details::log_msg &msg) const {
|
virtual int syslog_prio_from_level(const details::log_msg &msg) const {
|
||||||
return syslog_levels_.at(static_cast<levels_array::size_type>(msg.level));
|
return syslog_levels_.at(static_cast<levels_array::size_type>(msg.level));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
using levels_array = std::array<int, 7>;
|
using levels_array = std::array<int, 7>;
|
||||||
levels_array syslog_levels_;
|
levels_array syslog_levels_;
|
||||||
|
|
||||||
|
private:
|
||||||
// must store the ident because the man says openlog might use the pointer as
|
// must store the ident because the man says openlog might use the pointer as
|
||||||
// is and not a string copy
|
// is and not a string copy
|
||||||
const std::string ident_;
|
const std::string ident_;
|
||||||
|
Loading…
Reference in New Issue
Block a user