Revert "added spdlog::level::set_string_view to enable alternate log level names without changing the build via SPDLOG_LEVEL_NAMES"
This reverts commit 2a16d1d230.
			
			
This commit is contained in:
		@@ -25,11 +25,6 @@ SPDLOG_INLINE const string_view_t &to_string_view(spdlog::level::level_enum l) S
 | 
				
			|||||||
    return level_string_views[l];
 | 
					    return level_string_views[l];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SPDLOG_INLINE void set_string_view(spdlog::level::level_enum l, const string_view_t &s) SPDLOG_NOEXCEPT
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    level_string_views[l] = s;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
SPDLOG_INLINE const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT
 | 
					SPDLOG_INLINE const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return short_level_names[l];
 | 
					    return short_level_names[l];
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -168,7 +168,6 @@ enum level_enum
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SPDLOG_API const string_view_t &to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT;
 | 
					SPDLOG_API const string_view_t &to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT;
 | 
				
			||||||
SPDLOG_API void set_string_view(spdlog::level::level_enum l, const string_view_t &s) SPDLOG_NOEXCEPT;
 | 
					 | 
				
			||||||
SPDLOG_API const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT;
 | 
					SPDLOG_API const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT;
 | 
				
			||||||
SPDLOG_API spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT;
 | 
					SPDLOG_API spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -55,14 +55,6 @@ TEST_CASE("level_to_string_view", "[convert_to_string_view")
 | 
				
			|||||||
    REQUIRE(spdlog::level::to_string_view(spdlog::level::off) == "off");
 | 
					    REQUIRE(spdlog::level::to_string_view(spdlog::level::off) == "off");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TEST_CASE("set_level_to_string_view", "[set_string_view")
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    spdlog::level::set_string_view(spdlog::level::info, "INF");
 | 
					 | 
				
			||||||
    REQUIRE(spdlog::level::to_string_view(spdlog::level::info) == "INF");
 | 
					 | 
				
			||||||
    spdlog::level::set_string_view(spdlog::level::info, "info"); // set it back
 | 
					 | 
				
			||||||
    REQUIRE(spdlog::level::to_string_view(spdlog::level::info) == "info");
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
TEST_CASE("to_short_c_str", "[convert_to_short_c_str]")
 | 
					TEST_CASE("to_short_c_str", "[convert_to_short_c_str]")
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    REQUIRE(std::string(spdlog::level::to_short_c_str(spdlog::level::trace)) == "T");
 | 
					    REQUIRE(std::string(spdlog::level::to_short_c_str(spdlog::level::trace)) == "T");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user