Public Member Functions | Protected Attributes | List of all members
spdlog::sinks::sink Class Referenceabstract

#include <sink.h>

Inheritance diagram for spdlog::sinks::sink:
spdlog::sinks::ansicolor_sink< TargetStream, ConsoleMutex > spdlog::sinks::base_sink< Mutex > spdlog::sinks::stdout_sink< TargetStream, ConsoleMutex > spdlog::sinks::wincolor_sink< OutHandle, ConsoleMutex > spdlog::sinks::android_sink< Mutex > spdlog::sinks::basic_file_sink< Mutex > spdlog::sinks::daily_file_sink< Mutex, FileNameCalc > spdlog::sinks::dist_sink< Mutex > spdlog::sinks::null_sink< Mutex > spdlog::sinks::ostream_sink< Mutex > spdlog::sinks::rotating_file_sink< Mutex > spdlog::sinks::syslog_sink< Mutex >

Public Member Functions

 sink ()
 
 sink (std::unique_ptr< spdlog::pattern_formatter > formatter)
 
virtual ~sink ()=default
 
virtual void log (const details::log_msg &msg)=0
 
virtual void flush ()=0
 
virtual void set_pattern (const std::string &pattern)=0
 
virtual void set_formatter (std::unique_ptr< spdlog::formatter > sink_formatter)=0
 
bool should_log (level::level_enum msg_level) const
 
void set_level (level::level_enum log_level)
 
level::level_enum level () const
 

Protected Attributes

level_t level_
 
std::unique_ptr< spdlog::formatterformatter_
 

Detailed Description

Definition at line 14 of file sink.h.

Constructor & Destructor Documentation

spdlog::sinks::sink::sink ( )
inline

Definition at line 17 of file sink.h.

19  , formatter_(new pattern_formatter())
20  {
21  }
std::unique_ptr< spdlog::formatter > formatter_
Definition: sink.h:55
level_t level_
Definition: sink.h:52
spdlog::sinks::sink::sink ( std::unique_ptr< spdlog::pattern_formatter formatter)
inlineexplicit

Definition at line 23 of file sink.h.

25  , formatter_(std::move(formatter))
26  {
27  }
std::unique_ptr< spdlog::formatter > formatter_
Definition: sink.h:55
def move(depos, offset)
Definition: depos.py:107
level_t level_
Definition: sink.h:52
virtual spdlog::sinks::sink::~sink ( )
virtualdefault

Member Function Documentation

virtual void spdlog::sinks::sink::flush ( )
pure virtual
level::level_enum spdlog::sinks::sink::level ( ) const
inline

Definition at line 45 of file sink.h.

46  {
47  return static_cast<spdlog::level::level_enum>(level_.load(std::memory_order_relaxed));
48  }
level_t level_
Definition: sink.h:52
virtual void spdlog::sinks::sink::log ( const details::log_msg msg)
pure virtual
virtual void spdlog::sinks::sink::set_formatter ( std::unique_ptr< spdlog::formatter sink_formatter)
pure virtual
void spdlog::sinks::sink::set_level ( level::level_enum  log_level)
inline

Definition at line 40 of file sink.h.

41  {
42  level_.store(log_level);
43  }
level_t level_
Definition: sink.h:52
virtual void spdlog::sinks::sink::set_pattern ( const std::string pattern)
pure virtual
bool spdlog::sinks::sink::should_log ( level::level_enum  msg_level) const
inline

Definition at line 35 of file sink.h.

36  {
37  return msg_level >= level_.load(std::memory_order_relaxed);
38  }
level_t level_
Definition: sink.h:52

Member Data Documentation

std::unique_ptr<spdlog::formatter> spdlog::sinks::sink::formatter_
protected

Definition at line 55 of file sink.h.

level_t spdlog::sinks::sink::level_
protected

Definition at line 52 of file sink.h.


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