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

#include <pattern_formatter.h>

Inheritance diagram for spdlog::details::e_formatter:
spdlog::details::flag_formatter

Public Member Functions

 e_formatter (padding_info padinfo)
 
void format (const details::log_msg &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 462 of file pattern_formatter.h.

Constructor & Destructor Documentation

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

Definition at line 465 of file pattern_formatter.h.

466  : flag_formatter(padinfo){};

Member Function Documentation

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

Implements spdlog::details::flag_formatter.

Definition at line 468 of file pattern_formatter.h.

469  {
470  auto millis = fmt_helper::time_fraction<std::chrono::milliseconds>(msg.time);
471  if (padinfo_.enabled())
472  {
473  const size_t field_size = 3;
474  scoped_pad p(field_size, padinfo_, dest);
475  fmt_helper::pad3(static_cast<uint32_t>(millis.count()), dest);
476  }
477  else
478  {
479  fmt_helper::pad3(static_cast<uint32_t>(millis.count()), dest);
480  }
481  }
void msg(const char *fmt,...)
Definition: message.cpp:107
void pad3(T n, fmt::basic_memory_buffer< char, Buffer_Size > &dest)
Definition: fmt_helper.h:90
p
Definition: test.py:223

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