mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
Allow manual rotation of rotating_file_sink (#3269)
* Allow manual rotation of rotating_file_sink * Rename rotation method * Attempted fix for tests on Windows * Apply review mark-ups
This commit is contained in:
@@ -69,6 +69,11 @@ SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::filename() {
|
||||
return file_helper_.filename();
|
||||
}
|
||||
|
||||
template <typename Mutex>
|
||||
SPDLOG_INLINE void rotating_file_sink<Mutex>::rotate_now() {
|
||||
rotate_();
|
||||
}
|
||||
|
||||
template <typename Mutex>
|
||||
SPDLOG_INLINE void rotating_file_sink<Mutex>::sink_it_(const details::log_msg &msg) {
|
||||
memory_buf_t formatted;
|
||||
|
@@ -28,6 +28,7 @@ public:
|
||||
const file_event_handlers &event_handlers = {});
|
||||
static filename_t calc_filename(const filename_t &filename, std::size_t index);
|
||||
filename_t filename();
|
||||
void rotate_now();
|
||||
|
||||
protected:
|
||||
void sink_it_(const details::log_msg &msg) override;
|
||||
|
Reference in New Issue
Block a user