ealogger
ealogger is a c++ library that provides a blazing fast and easy to use logging mechanism
|
Sink writing to unix syslog. More...
#include <sink_syslog.h>
Public Member Functions | |
SinkSyslog (std::string msg_template, std::string datetime_pattern, bool enabled, ealogger::constants::LOG_LEVEL min_lvl) | |
Constructor for a syslog sink. More... | |
Public Member Functions inherited from ealogger::Sink | |
Sink (std::string msg_template, std::string datetime_pattern, bool enabled, ealogger::constants::LOG_LEVEL min_lvl) | |
Sink constructor. More... | |
void | set_msg_template (std::string msg_template) |
Set the message template with conversion patterns. More... | |
void | set_datetime_pattern (std::string datetime_pattern) |
Set the date time conversion pattern. More... | |
void | set_enabled (bool enabled) |
Enable or disable the sink. More... | |
bool | get_enabled () |
Check if this sink is enabled. More... | |
void | set_min_lvl (ealogger::constants::LOG_LEVEL min_lvl) |
Set minimum severity for this sink. More... | |
void | prepare_log_message (const std::shared_ptr< LogMessage > &log_message) |
Prepare a log message before it is written to the targets. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ealogger::Sink | |
void | fill_conv_patterns (bool lock) |
Fill Sink::vec_conv_patterns with ConverionPattern depending on Sink::msg_template. | |
virtual void | write_message (const std::string &msg)=0 |
Writes a LogMessage object to the logger sink. More... | |
Protected Attributes inherited from ealogger::Sink | |
std::string | msg_template |
std::string | datetime_pattern |
bool | enabled |
ealogger::constants::LOG_LEVEL | min_level |
std::mutex | mtx_msg_template |
std::mutex | mtx_datetime_pattern |
std::mutex | mtx_enabled |
std::mutex | mtx_min_lvl |
std::mutex | mtx_conv_pattern |
std::vector< ConversionPattern > | vec_conv_patterns |
std::map< ealogger::constants::LOG_LEVEL, std::string > | loglevel_lookup |
Sink writing to unix syslog.
ealogger::SinkSyslog::SinkSyslog | ( | std::string | msg_template, |
std::string | datetime_pattern, | ||
bool | enabled, | ||
ealogger::constants::LOG_LEVEL | min_lvl | ||
) |
Constructor for a syslog sink.
msg_template | Message template based on conversion patterns |
datetime_pattern | Date and time conversion specifiers |
enabled | Whether or not this sink is enabled |
min_lvl | Minimum severity for this sink |
A sink that can be used to write log messages to system syslog