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

#include <pattern_formatter.h>

Inheritance diagram for spdlog::details::D_formatter:
spdlog::details::flag_formatter

Public Member Functions

 D_formatter (padding_info padinfo)
 
void format (const details::log_msg &, const std::tm &tm_time, 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 329 of file pattern_formatter.h.

Constructor & Destructor Documentation

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

Definition at line 332 of file pattern_formatter.h.

333  : flag_formatter(padinfo)
334  {
335  }

Member Function Documentation

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

Implements spdlog::details::flag_formatter.

Definition at line 337 of file pattern_formatter.h.

338  {
339  const size_t field_size = 10;
340  scoped_pad p(field_size, padinfo_, dest);
341 
342  fmt_helper::pad2(tm_time.tm_mon + 1, dest);
343  dest.push_back('/');
344  fmt_helper::pad2(tm_time.tm_mday, dest);
345  dest.push_back('/');
346  fmt_helper::pad2(tm_time.tm_year % 100, dest);
347  }
p
Definition: test.py:223
void pad2(int n, fmt::basic_memory_buffer< char, Buffer_Size > &dest)
Definition: fmt_helper.h:54

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