Skip to content

Commit 1ecf32f

Browse files
Attributes: use proper function for overwriting attributes
1 parent 9436b2e commit 1ecf32f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/spdlog/attributes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class SPDLOG_API log_attributes {
4646

4747
void put(attr_map_t const& attributes) {
4848
auto lck = lock();
49-
attrs.insert(attributes.begin(), attributes.end());
49+
for (auto const& attribute : attributes) attrs.insert_or_assign(attribute.first, attribute.second);
5050
}
5151
void put(const key_t& key, const value_t& value) { put({{key, value}}); }
5252

0 commit comments

Comments
 (0)