Skip to content

Commit 1a58d82

Browse files
committed
fmt
1 parent ae3219f commit 1a58d82

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

src/test/function_test/base_api/test_batch_get.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
#include <ext/alloc_traits.h>
20+
// IWYU pragma: no_include <ext/alloc_traits.h>
2121
#include <rocksdb/status.h>
2222
#include <rrdb/rrdb_types.h>
2323
#include <stdint.h>

src/utils/logging.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#include <ext/alloc_traits.h>
27+
// IWYU pragma: no_include <ext/alloc_traits.h>
2828
#include <fmt/core.h>
2929
#include <fmt/format.h>
3030
// IWYU pragma: no_include <spdlog/details/file_helper-inl.h>
@@ -70,11 +70,11 @@ enum log_level_t
7070
};
7171

7272
ENUM_BEGIN(log_level_t, LOG_LEVEL_INVALID)
73-
ENUM_REG(LOG_LEVEL_DEBUG)
74-
ENUM_REG(LOG_LEVEL_INFO)
75-
ENUM_REG(LOG_LEVEL_WARNING)
76-
ENUM_REG(LOG_LEVEL_ERROR)
77-
ENUM_REG(LOG_LEVEL_FATAL)
73+
ENUM_REG(LOG_LEVEL_DEBUG)
74+
ENUM_REG(LOG_LEVEL_INFO)
75+
ENUM_REG(LOG_LEVEL_WARNING)
76+
ENUM_REG(LOG_LEVEL_ERROR)
77+
ENUM_REG(LOG_LEVEL_FATAL)
7878
ENUM_END(log_level_t)
7979

8080
DSN_DEFINE_string(core,
@@ -241,7 +241,9 @@ std::string log_prefixed_message_func()
241241
return prefix;
242242
}
243243

244-
void pegasus_formatter_flag::format(const spdlog::details::log_msg &, const std::tm &, spdlog::memory_buf_t &dest)
244+
void pegasus_formatter_flag::format(const spdlog::details::log_msg &,
245+
const std::tm &,
246+
spdlog::memory_buf_t &dest)
245247
{
246248
const auto prefix = log_prefixed_message_func();
247249
dest.append(prefix.data(), prefix.data() + prefix.size());

src/utils/logging.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,18 @@
3030
namespace spdlog {
3131
namespace details {
3232
struct log_msg;
33-
} // namespace details
34-
} // namespace spdlog
33+
} // namespace details
34+
} // namespace spdlog
3535
struct tm;
3636

37-
// To keep the log format consistent with the existing log format, we need to print thread pool information in the log,
38-
// spdlog use custom_flag_formatter to implement this feature.
39-
// See https://github.com/gabime/spdlog/wiki/3.-Custom-formatting#extending-spdlog-with-your-own-flags.
37+
// To keep the log format consistent with the existing log format, we need to print thread pool
38+
// information in the log, spdlog use custom_flag_formatter to implement this feature. See
39+
// https://github.com/gabime/spdlog/wiki/3.-Custom-formatting#extending-spdlog-with-your-own-flags.
4040
class pegasus_formatter_flag : public spdlog::custom_flag_formatter
4141
{
4242
public:
43-
void format(const spdlog::details::log_msg &, const std::tm &, spdlog::memory_buf_t &dest) override;
43+
void
44+
format(const spdlog::details::log_msg &, const std::tm &, spdlog::memory_buf_t &dest) override;
4445
std::unique_ptr<custom_flag_formatter> clone() const override;
4546
};
4647

0 commit comments

Comments
 (0)