mirror of
https://github.com/gabime/spdlog.git
synced 2026-04-10 11:34:29 +08:00
@@ -5,9 +5,9 @@
|
||||
|
||||
#include <cerrno>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <sstream>
|
||||
|
||||
#include "spdlog/common.h"
|
||||
#include "spdlog/details/file_helper.h"
|
||||
@@ -51,10 +51,10 @@ filename_t rotating_file_sink<Mutex>::calc_filename(const filename_t &filename,
|
||||
|
||||
filename_t basename;
|
||||
filename_t ext;
|
||||
std::tie(basename, ext) = details::os::split_by_extension(filename);
|
||||
std::tie(basename, ext) = details::os::split_by_extension(filename);
|
||||
std::basic_ostringstream<filename_t::value_type> oss;
|
||||
oss << basename.native() << '.' << index << ext.native();
|
||||
return oss.str();
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
template <typename Mutex>
|
||||
@@ -132,7 +132,7 @@ void rotating_file_sink<Mutex>::rotate_() {
|
||||
// delete the target if exists, and rename the src file to target
|
||||
// return true on success, false otherwise.
|
||||
template <typename Mutex>
|
||||
bool rotating_file_sink<Mutex>::rename_file_(const filename_t &src_filename, const filename_t &target_filename) noexcept{
|
||||
bool rotating_file_sink<Mutex>::rename_file_(const filename_t &src_filename, const filename_t &target_filename) noexcept {
|
||||
return details::os::rename(src_filename, target_filename);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user