Skip to content

Commit

Permalink
🐛 fix symbol names
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdd committed Apr 4, 2024
1 parent b15f670 commit 7d16d17
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions include/logfmtxx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ namespace logfmtxx {
}

struct record {
level level;
std::chrono::system_clock::time_point timestamp;
std::string message;
level lvl;
std::chrono::system_clock::time_point ts;
std::string msg;
std::vector<std::pair<std::string, std::string>> extras;
};
}
Expand Down Expand Up @@ -101,9 +101,9 @@ namespace logfmtxx {
template <typename... Args>
void log(level level, const std::string& message, field<Args>... fields) {
auto record = details::record{
.level = level,
.timestamp = clock_type::now(),
.message = message
.lvl = level,
.ts = clock_type::now(),
.msg = message
};

for (const auto& [key, value] : m_extras) {
Expand All @@ -119,9 +119,9 @@ namespace logfmtxx {
std::string format(const details::record& record) {
auto stream = std::ostringstream{};

stream << "time=" << details::serialize(record.timestamp) << " ";
stream << "level=" << details::serialize(record.level) << " ";
stream << "message=" << std::quoted(record.message);
stream << "time=" << details::serialize(record.ts) << " ";
stream << "level=" << details::serialize(record.lvl) << " ";
stream << "message=" << std::quoted(record.msg);

for (const auto& [key, value] : record.extras) {
stream << " " << key << "=" << value;
Expand Down

0 comments on commit 7d16d17

Please sign in to comment.