mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
V2.x no std format (#3271)
* Removed SPDLOG_USE_STD_FORMAT * Removed SPDLOG_USE_STD_FORMAT * clang-format * Fix windows.yml ci * Fix ci
This commit is contained in:
@@ -26,13 +26,9 @@ spdlog_ex::spdlog_ex(std::string msg)
|
||||
: msg_(std::move(msg)) {}
|
||||
|
||||
spdlog_ex::spdlog_ex(const std::string &msg, int last_errno) {
|
||||
#ifdef SPDLOG_USE_STD_FORMAT
|
||||
msg_ = std::system_error(std::error_code(last_errno, std::generic_category()), msg).what();
|
||||
#else
|
||||
memory_buf_t outbuf;
|
||||
fmt::format_system_error(outbuf, last_errno, msg.c_str());
|
||||
msg_ = fmt::to_string(outbuf);
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *spdlog_ex::what() const noexcept { return msg_.c_str(); }
|
||||
|
Reference in New Issue
Block a user