Agora  1.2.0
Agora project
spdlog::sinks::systemd_sink< Mutex > Class Template Reference

#include <systemd_sink.h>

Inheritance diagram for spdlog::sinks::systemd_sink< Mutex >:
Collaboration diagram for spdlog::sinks::systemd_sink< Mutex >:

Public Member Functions

 systemd_sink (std::string ident="", bool enable_formatting=false)
 
 ~systemd_sink () override
 
 systemd_sink (const systemd_sink &)=delete
 
systemd_sinkoperator= (const systemd_sink &)=delete
 
- Public Member Functions inherited from spdlog::sinks::base_sink< Mutex >
 base_sink ()
 
 base_sink (std::unique_ptr< spdlog::formatter > formatter)
 
 ~base_sink () override=default
 
 base_sink (const base_sink &)=delete
 
 base_sink (base_sink &&)=delete
 
base_sinkoperator= (const base_sink &)=delete
 
base_sinkoperator= (base_sink &&)=delete
 
void log (const details::log_msg &msg) final
 
void flush () final
 
void set_pattern (const std::string &pattern) final
 
void set_formatter (std::unique_ptr< spdlog::formatter > sink_formatter) final
 
- Public Member Functions inherited from spdlog::sinks::sink
virtual ~sink ()=default
 
void set_level (level::level_enum log_level)
 
level::level_enum level () const
 
bool should_log (level::level_enum msg_level) const
 

Protected Types

using levels_array = std::array< int, 7 >
 

Protected Member Functions

void sink_it_ (const details::log_msg &msg) override
 
int syslog_level (level::level_enum l)
 
void flush_ () override
 
- Protected Member Functions inherited from spdlog::sinks::base_sink< Mutex >
virtual void set_pattern_ (const std::string &pattern)
 
virtual void set_formatter_ (std::unique_ptr< spdlog::formatter > sink_formatter)
 

Protected Attributes

const std::string ident_
 
bool enable_formatting_ = false
 
levels_array syslog_levels_
 
- Protected Attributes inherited from spdlog::sinks::base_sink< Mutex >
std::unique_ptr< spdlog::formatterformatter_
 
Mutex mutex_
 
- Protected Attributes inherited from spdlog::sinks::sink
level_t level_ {level::trace}
 

Detailed Description

template<typename Mutex>
class spdlog::sinks::systemd_sink< Mutex >

Sink that write to systemd journal using the sd_journal_send() library call.

Member Typedef Documentation

◆ levels_array

template<typename Mutex >
using spdlog::sinks::systemd_sink< Mutex >::levels_array = std::array<int, 7>
protected

Constructor & Destructor Documentation

◆ systemd_sink() [1/2]

template<typename Mutex >
spdlog::sinks::systemd_sink< Mutex >::systemd_sink ( std::string  ident = "",
bool  enable_formatting = false 
)
inline

◆ ~systemd_sink()

template<typename Mutex >
spdlog::sinks::systemd_sink< Mutex >::~systemd_sink ( )
inlineoverride

◆ systemd_sink() [2/2]

template<typename Mutex >
spdlog::sinks::systemd_sink< Mutex >::systemd_sink ( const systemd_sink< Mutex > &  )
delete

Member Function Documentation

◆ flush_()

template<typename Mutex >
void spdlog::sinks::systemd_sink< Mutex >::flush_ ( )
inlineoverrideprotectedvirtual

◆ operator=()

template<typename Mutex >
systemd_sink& spdlog::sinks::systemd_sink< Mutex >::operator= ( const systemd_sink< Mutex > &  )
delete

◆ sink_it_()

template<typename Mutex >
void spdlog::sinks::systemd_sink< Mutex >::sink_it_ ( const details::log_msg msg)
inlineoverrideprotectedvirtual

Implements spdlog::sinks::base_sink< Mutex >.

Here is the call graph for this function:

◆ syslog_level()

template<typename Mutex >
int spdlog::sinks::systemd_sink< Mutex >::syslog_level ( level::level_enum  l)
inlineprotected
Here is the caller graph for this function:

Member Data Documentation

◆ enable_formatting_

template<typename Mutex >
bool spdlog::sinks::systemd_sink< Mutex >::enable_formatting_ = false
protected

◆ ident_

template<typename Mutex >
const std::string spdlog::sinks::systemd_sink< Mutex >::ident_
protected

◆ syslog_levels_

template<typename Mutex >
levels_array spdlog::sinks::systemd_sink< Mutex >::syslog_levels_
protected

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