Skip to content

Commit 24dde31

Browse files
Adding lock to rotate_now() (#3281)
1 parent 65e388e commit 24dde31

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/spdlog/sinks/rotating_file_sink-inl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::filename() {
7171

7272
template <typename Mutex>
7373
SPDLOG_INLINE void rotating_file_sink<Mutex>::rotate_now() {
74+
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
7475
rotate_();
7576
}
7677

0 commit comments

Comments
 (0)