1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-05-03 05:23:51 +00:00

Adding lock to rotate_now() (#3281)

This commit is contained in:
Matteo Del Seppia 2024-12-03 08:53:34 +01:00 committed by GitHub
parent 65e388e82b
commit 24dde318fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,6 +71,7 @@ SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::filename() {
template <typename Mutex>
SPDLOG_INLINE void rotating_file_sink<Mutex>::rotate_now() {
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
rotate_();
}