Adding lock in basic_file_sink truncate()
This commit is contained in:
parent
e79d95925a
commit
892cf9078a
@ -28,6 +28,7 @@ SPDLOG_INLINE const filename_t &basic_file_sink<Mutex>::filename() const {
|
|||||||
|
|
||||||
template <typename Mutex>
|
template <typename Mutex>
|
||||||
SPDLOG_INLINE void basic_file_sink<Mutex>::truncate() {
|
SPDLOG_INLINE void basic_file_sink<Mutex>::truncate() {
|
||||||
|
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
|
||||||
file_helper_.reopen(true);
|
file_helper_.reopen(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user