ealogger
ealogger is a c++ library that provides a blazing fast and easy to use logging mechanism
Public Member Functions | List of all members
ealogger::SinkConsole Class Reference

Sink to write to a console. More...

#include <sink_console.h>

Inheritance diagram for ealogger::SinkConsole:
ealogger::Sink

Public Member Functions

 SinkConsole (std::string msg_template, std::string datetime_pattern, bool enabled, ealogger::constants::LOG_LEVEL min_lvl)
 Console sink constructor. 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.
 
- 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< ConversionPatternvec_conv_patterns
 
std::map< ealogger::constants::LOG_LEVEL, std::string > loglevel_lookup
 

Detailed Description

Sink to write to a console.

Constructor & Destructor Documentation

ealogger::SinkConsole::SinkConsole ( std::string  msg_template,
std::string  datetime_pattern,
bool  enabled,
ealogger::constants::LOG_LEVEL  min_lvl 
)

Console sink constructor.

Parameters
msg_templateMessage template based on conversion patterns
datetime_patternDate and time conversion specifiers
enabledWhether or not this sink is enabled
min_lvlMinimum severity for this sink

The documentation for this class was generated from the following files: