diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 205c124c..a9eab24d 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -156,23 +156,14 @@ using atomic_level_t = details::null_atomic; using atomic_level_t = std::atomic; #endif -#if !defined(SPDLOG_LEVEL_NAMES) - #define SPDLOG_LEVEL_NAMES \ - { "trace", "debug", "info", "warning", "error", "critical", "off" } -#endif - -#if !defined(SPDLOG_SHORT_LEVEL_NAMES) - #define SPDLOG_SHORT_LEVEL_NAMES \ - { "T", "D", "I", "W", "E", "C", "O" } -#endif [[nodiscard]] constexpr size_t level_to_number(level lvl) noexcept { return static_cast(lvl); } constexpr auto levels_count = level_to_number(level::n_levels); -constexpr std::array level_string_views SPDLOG_LEVEL_NAMES; -constexpr std::array short_level_names SPDLOG_SHORT_LEVEL_NAMES; +constexpr std::array level_string_views { "trace", "debug", "info", "warning", "error", "critical", "off" }; +constexpr std::array short_level_names { "T", "D", "I", "W", "E", "C", "O" }; [[nodiscard]] constexpr string_view_t to_string_view(spdlog::level lvl) noexcept { return level_string_views.at(level_to_number(lvl));