From 4df6d6690675300c290466e3b1daa31617bcad54 Mon Sep 17 00:00:00 2001 From: Yingchun Lai Date: Fri, 2 Aug 2024 20:58:51 +0800 Subject: [PATCH] 1 --- src/meta/test/dump_file.cpp | 1 - src/utils/logging.cpp | 4 ++-- src/utils/test/endian_test.cpp | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/meta/test/dump_file.cpp b/src/meta/test/dump_file.cpp index 0f6347cbcd..b1528c8816 100644 --- a/src/meta/test/dump_file.cpp +++ b/src/meta/test/dump_file.cpp @@ -24,7 +24,6 @@ * THE SOFTWARE. */ -#include #include #include #include diff --git a/src/utils/logging.cpp b/src/utils/logging.cpp index 1ef383fc9f..63d4fbc463 100644 --- a/src/utils/logging.cpp +++ b/src/utils/logging.cpp @@ -142,7 +142,6 @@ static void log_on_sys_exit(::dsn::sys_exit_type) { g_stderr_logger->flush(); g_file_logger->flush(); - log_cmds.clear(); } void dsn_log_init(const std::string &log_dir, const std::string &role_name) @@ -151,7 +150,8 @@ void dsn_log_init(const std::string &log_dir, const std::string &role_name) "file", fmt::format("{}/{}.log", log_dir, role_name.empty() ? FLAGS_base_name : role_name), FLAGS_max_log_file_bytes, - FLAGS_max_number_of_log_files_on_disk); + FLAGS_max_number_of_log_files_on_disk, + true /*rotate_on_open*/); // _symlink_path = utils::filesystem::path_combine(_log_dir, symlink_name); const auto file_start_level = to_spdlog_levels[enum_from_string(FLAGS_logging_start_level, LOG_LEVEL_INVALID)]; diff --git a/src/utils/test/endian_test.cpp b/src/utils/test/endian_test.cpp index dd8a807c66..6dc8462707 100644 --- a/src/utils/test/endian_test.cpp +++ b/src/utils/test/endian_test.cpp @@ -21,7 +21,6 @@ #include "gtest/gtest.h" #include "utils/endians.h" -#include "utils/enum_helper.h" using namespace dsn;