Static Public Member Functions | List of all members
spdlog::sinks::daily_filename_calculator Struct Reference

#include <daily_file_sink.h>

Static Public Member Functions

static filename_t calc_filename (const filename_t &filename, const tm &now_tm)
 

Detailed Description

Definition at line 29 of file daily_file_sink.h.

Member Function Documentation

static filename_t spdlog::sinks::daily_filename_calculator::calc_filename ( const filename_t filename,
const tm &  now_tm 
)
inlinestatic

Definition at line 32 of file daily_file_sink.h.

33  {
34  filename_t basename, ext;
35  std::tie(basename, ext) = details::file_helper::split_by_extension(filename);
38  w, SPDLOG_FILENAME_T("{}_{:04d}-{:02d}-{:02d}{}"), basename, now_tm.tm_year + 1900, now_tm.tm_mon + 1, now_tm.tm_mday, ext);
39  return fmt::to_string(w);
40  }
basic_memory_buffer< char > memory_buffer
Definition: format.h:553
string filename
Definition: train.py:213
std::enable_if< is_contiguous< Container >::value &&internal::is_string< S >::value, std::back_insert_iterator< Container > >::type format_to(std::back_insert_iterator< Container > out, const S &format_str, const Args &...args)
Definition: core.h:1430
static std::tuple< filename_t, filename_t > split_by_extension(const spdlog::filename_t &fname)
Definition: file_helper.h:125
std::string filename_t
Definition: common.h:202
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
#define SPDLOG_FILENAME_T(s)
Definition: os.h:369
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
basic_memory_buffer< wchar_t > wmemory_buffer
Definition: format.h:554

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