Commit 95485ee8 authored by IIFEgit's avatar IIFEgit

keep filename as it's public

parent 0b86d6a4
......@@ -70,6 +70,12 @@ public:
}
}
filename_t filename()
{
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
return file_helper_.filename();
}
protected:
void sink_it_(const details::log_msg &msg) override
{
......
......@@ -53,6 +53,13 @@ SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::calc_filename(const filename
return fmt::format(SPDLOG_FILENAME_T("{}.{}{}"), basename, index, ext);
}
template<typename Mutex>
SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::filename()
{
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
return file_helper_.filename();
}
template<typename Mutex>
SPDLOG_INLINE void rotating_file_sink<Mutex>::sink_it_(const details::log_msg &msg)
{
......
......@@ -24,6 +24,7 @@ class rotating_file_sink final : public base_sink<Mutex>
public:
rotating_file_sink(filename_t base_filename, std::size_t max_size, std::size_t max_files, bool rotate_on_open = false);
static filename_t calc_filename(const filename_t &filename, std::size_t index);
filename_t filename();
protected:
void sink_it_(const details::log_msg &msg) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment