Public Member Functions | List of all members
spdlog::details::pid_formatter Class Referencefinal

#include <pattern_formatter.h>

Inheritance diagram for spdlog::details::pid_formatter:
spdlog::details::flag_formatter

Public Member Functions

 pid_formatter (padding_info padinfo)
 
void format (const details::log_msg &, const std::tm &, fmt::memory_buffer &dest) override
 
- Public Member Functions inherited from spdlog::details::flag_formatter
 flag_formatter (padding_info padinfo)
 
 flag_formatter ()=default
 
virtual ~flag_formatter ()=default
 

Additional Inherited Members

- Protected Attributes inherited from spdlog::details::flag_formatter
padding_info padinfo_
 

Detailed Description

Definition at line 704 of file pattern_formatter.h.

Constructor & Destructor Documentation

spdlog::details::pid_formatter::pid_formatter ( padding_info  padinfo)
inlineexplicit

Definition at line 707 of file pattern_formatter.h.

708  : flag_formatter(padinfo){};

Member Function Documentation

void spdlog::details::pid_formatter::format ( const details::log_msg ,
const std::tm &  ,
fmt::memory_buffer dest 
)
inlineoverridevirtual

Implements spdlog::details::flag_formatter.

Definition at line 710 of file pattern_formatter.h.

711  {
712  const auto pid = static_cast<uint32_t>(details::os::pid());
713  if (padinfo_.enabled())
714  {
715  auto field_size = fmt_helper::count_digits(pid);
716  scoped_pad p(field_size, padinfo_, dest);
718  }
719  else
720  {
722  }
723  }
void append_int(T n, fmt::basic_memory_buffer< char, Buffer_Size > &dest)
Definition: fmt_helper.h:40
unsigned int uint32_t
Definition: stdint.h:126
p
Definition: test.py:223
unsigned count_digits(T n)
Definition: fmt_helper.h:47

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