Attributes: moving to ordered map

Otherwise the attributes are printed in pseudo-random order.
This commit is contained in:
Felix Heitmann 2024-07-05 14:55:46 +02:00 committed by M4rFri
parent e8924a3d47
commit 7d421eb56c

View File

@ -2,14 +2,15 @@
#include <spdlog/common.h> #include <spdlog/common.h>
#include <map>
#include <mutex> #include <mutex>
#include <unordered_map>
namespace spdlog { namespace spdlog {
class SPDLOG_API log_attributes { class SPDLOG_API log_attributes {
public: public:
using attr_map_t = std::unordered_map<std::string, std::string>; using attr_map_t = std::map<std::string, std::string>;
using key_t = attr_map_t::key_type; using key_t = attr_map_t::key_type;
using value_t = attr_map_t::mapped_type; using value_t = attr_map_t::mapped_type;
using const_iter = attr_map_t::const_iterator; using const_iter = attr_map_t::const_iterator;