|
|
@ -71,6 +71,24 @@ SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::filename()
|
|
|
|
return file_helper_.filename();
|
|
|
|
return file_helper_.filename();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename Mutex>
|
|
|
|
|
|
|
|
SPDLOG_INLINE std::size_t rotating_file_sink<Mutex>::get_max_size() const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
|
|
|
|
|
|
|
return max_size_;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename Mutex>
|
|
|
|
|
|
|
|
SPDLOG_INLINE void rotating_file_sink<Mutex>::set_max_size(const std::size_t max_size)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
|
|
|
|
|
|
|
if (max_size == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw_spdlog_ex("rotating sink set_max_size: max_size cannot be zero");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
max_size_ = max_size;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template<typename Mutex>
|
|
|
|
template<typename Mutex>
|
|
|
|
SPDLOG_INLINE void rotating_file_sink<Mutex>::sink_it_(const details::log_msg &msg)
|
|
|
|
SPDLOG_INLINE void rotating_file_sink<Mutex>::sink_it_(const details::log_msg &msg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|