Agora  1.2.0
Agora project
spdlog::pattern_formatter Class Referencefinal

#include <pattern_formatter.h>

Inheritance diagram for spdlog::pattern_formatter:
Collaboration diagram for spdlog::pattern_formatter:

Public Types

using custom_flags = std::unordered_map< char, std::unique_ptr< custom_flag_formatter > >
 

Public Member Functions

 pattern_formatter (std::string pattern, pattern_time_type time_type=pattern_time_type::local, std::string eol=spdlog::details::os::default_eol, custom_flags custom_user_flags=custom_flags())
 
 pattern_formatter (pattern_time_type time_type=pattern_time_type::local, std::string eol=spdlog::details::os::default_eol)
 
 pattern_formatter (const pattern_formatter &other)=delete
 
pattern_formatteroperator= (const pattern_formatter &other)=delete
 
std::unique_ptr< formatterclone () const override
 
void format (const details::log_msg &msg, memory_buf_t &dest) override
 
template<typename T , typename... Args>
pattern_formatteradd_flag (char flag, Args &&... args)
 
void set_pattern (std::string pattern)
 
template<typename Padder >
SPDLOG_INLINE void handle_flag_ (char flag, details::padding_info padding)
 
- Public Member Functions inherited from spdlog::formatter
virtual ~formatter ()=default
 

Private Member Functions

std::tm get_time_ (const details::log_msg &msg)
 
template<typename Padder >
void handle_flag_ (char flag, details::padding_info padding)
 
void compile_pattern_ (const std::string &pattern)
 

Static Private Member Functions

static details::padding_info handle_padspec_ (std::string::const_iterator &it, std::string::const_iterator end)
 

Private Attributes

std::string pattern_
 
std::string eol_
 
pattern_time_type pattern_time_type_
 
bool need_localtime_
 
std::tm cached_tm_
 
std::chrono::seconds last_log_secs_
 
std::vector< std::unique_ptr< details::flag_formatter > > formatters_
 
custom_flags custom_handlers_
 

Member Typedef Documentation

◆ custom_flags

using spdlog::pattern_formatter::custom_flags = std::unordered_map<char, std::unique_ptr<custom_flag_formatter> >

Constructor & Destructor Documentation

◆ pattern_formatter() [1/3]

SPDLOG_INLINE spdlog::pattern_formatter::pattern_formatter ( std::string  pattern,
pattern_time_type  time_type = pattern_time_type::local,
std::string  eol = spdlog::details::os::default_eol,
custom_flags  custom_user_flags = custom_flags() 
)
explicit
Here is the call graph for this function:

◆ pattern_formatter() [2/3]

SPDLOG_INLINE spdlog::pattern_formatter::pattern_formatter ( pattern_time_type  time_type = pattern_time_type::local,
std::string  eol = spdlog::details::os::default_eol 
)
explicit

◆ pattern_formatter() [3/3]

spdlog::pattern_formatter::pattern_formatter ( const pattern_formatter other)
delete

Member Function Documentation

◆ add_flag()

template<typename T , typename... Args>
pattern_formatter& spdlog::pattern_formatter::add_flag ( char  flag,
Args &&...  args 
)
inline

◆ clone()

SPDLOG_INLINE std::unique_ptr< formatter > spdlog::pattern_formatter::clone ( ) const
overridevirtual

Implements spdlog::formatter.

◆ compile_pattern_()

SPDLOG_INLINE void spdlog::pattern_formatter::compile_pattern_ ( const std::string &  pattern)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ format()

SPDLOG_INLINE void spdlog::pattern_formatter::format ( const details::log_msg msg,
memory_buf_t dest 
)
overridevirtual

Implements spdlog::formatter.

Here is the call graph for this function:

◆ get_time_()

SPDLOG_INLINE std::tm spdlog::pattern_formatter::get_time_ ( const details::log_msg msg)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handle_flag_() [1/2]

template<typename Padder >
void spdlog::pattern_formatter::handle_flag_ ( char  flag,
details::padding_info  padding 
)
private

◆ handle_flag_() [2/2]

template<typename Padder >
SPDLOG_INLINE void spdlog::pattern_formatter::handle_flag_ ( char  flag,
details::padding_info  padding 
)
Here is the call graph for this function:

◆ handle_padspec_()

SPDLOG_INLINE details::padding_info spdlog::pattern_formatter::handle_padspec_ ( std::string::const_iterator &  it,
std::string::const_iterator  end 
)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

pattern_formatter& spdlog::pattern_formatter::operator= ( const pattern_formatter other)
delete

◆ set_pattern()

SPDLOG_INLINE void spdlog::pattern_formatter::set_pattern ( std::string  pattern)
Here is the call graph for this function:

Member Data Documentation

◆ cached_tm_

std::tm spdlog::pattern_formatter::cached_tm_
private

◆ custom_handlers_

custom_flags spdlog::pattern_formatter::custom_handlers_
private

◆ eol_

std::string spdlog::pattern_formatter::eol_
private

◆ formatters_

std::vector<std::unique_ptr<details::flag_formatter> > spdlog::pattern_formatter::formatters_
private

◆ last_log_secs_

std::chrono::seconds spdlog::pattern_formatter::last_log_secs_
private

◆ need_localtime_

bool spdlog::pattern_formatter::need_localtime_
private

◆ pattern_

std::string spdlog::pattern_formatter::pattern_
private

◆ pattern_time_type_

pattern_time_type spdlog::pattern_formatter::pattern_time_type_
private

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