Rename rotation method
This commit is contained in:
parent
975cdf6b94
commit
e0b3ae2ba3
@ -70,7 +70,7 @@ SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::filename() {
|
||||
}
|
||||
|
||||
template <typename Mutex>
|
||||
SPDLOG_INLINE void rotating_file_sink<Mutex>::force_rotation() {
|
||||
SPDLOG_INLINE void rotating_file_sink<Mutex>::rotate_now() {
|
||||
SPDLOG_TRY { rotate_(); }
|
||||
SPDLOG_CATCH_STD
|
||||
}
|
||||
|
@ -28,7 +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 force_rotation();
|
||||
void rotate_now();
|
||||
|
||||
protected:
|
||||
void sink_it_(const details::log_msg &msg) override;
|
||||
|
@ -102,7 +102,7 @@ TEST_CASE("rotating_file_logger3", "[rotating_logger]") {
|
||||
spdlog::spdlog_ex);
|
||||
}
|
||||
|
||||
// test forced rotation of logs
|
||||
// test on-demand rotation of logs
|
||||
TEST_CASE("rotating_file_logger4", "[rotating_logger]") {
|
||||
prepare_logdir();
|
||||
size_t max_size = 1024 * 10;
|
||||
@ -112,7 +112,7 @@ TEST_CASE("rotating_file_logger4", "[rotating_logger]") {
|
||||
logger->info("Test message - pre-rotation");
|
||||
logger->flush();
|
||||
|
||||
sink->force_rotation();
|
||||
sink->rotate_now();
|
||||
|
||||
logger->info("Test message - post-rotation");
|
||||
logger->flush();
|
||||
|
Loading…
Reference in New Issue
Block a user