23 template <
typename Mutex>
63 template <
typename Factory = spdlog::synchronous_factory>
66 return Factory::template create<sinks::rotating_file_sink_mt>(
67 logger_name, filename, max_file_size, max_files, rotate_on_open, event_handlers);
70 template <
typename Factory = spdlog::synchronous_factory>
73 return Factory::template create<sinks::rotating_file_sink_st>(
74 logger_name, filename, max_file_size, max_files, rotate_on_open, event_handlers);
78#ifdef SPDLOG_HEADER_ONLY
Definition file_helper.h:19
Definition base_sink.h:22
Definition rotating_file_sink.h:25
bool rename_file_(const filename_t &src_filename, const filename_t &target_filename)
Definition rotating_file_sink-inl.h:143
std::size_t max_files_
Definition rotating_file_sink.h:49
filename_t base_filename_
Definition rotating_file_sink.h:47
void flush_() override
Definition rotating_file_sink-inl.h:97
std::size_t current_size_
Definition rotating_file_sink.h:50
filename_t filename()
Definition rotating_file_sink-inl.h:67
std::size_t max_size_
Definition rotating_file_sink.h:48
static filename_t calc_filename(const filename_t &filename, std::size_t index)
Definition rotating_file_sink-inl.h:54
void sink_it_(const details::log_msg &msg) override
Definition rotating_file_sink-inl.h:74
details::file_helper file_helper_
Definition rotating_file_sink.h:51
void rotate_()
Definition rotating_file_sink-inl.h:108
rotating_file_sink< details::null_mutex > rotating_file_sink_st
Definition rotating_file_sink.h:55
rotating_file_sink< std::mutex > rotating_file_sink_mt
Definition rotating_file_sink.h:54
std::shared_ptr< logger > rotating_logger_st(const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files, bool rotate_on_open=false, const file_event_handlers &event_handlers={})
Definition rotating_file_sink.h:71
std::shared_ptr< logger > rotating_logger_mt(const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files, bool rotate_on_open=false, const file_event_handlers &event_handlers={})
Definition rotating_file_sink.h:64
std::string filename_t
Definition common.h:131