util: add timestamp and thread_name to log::Entry

This commit is contained in:
stickies-v
2026-03-10 14:12:14 +08:00
parent 8a55b17751
commit b414913c73

View File

@@ -10,6 +10,8 @@
#include <logging/categories.h> // IWYU pragma: export
#include <tinyformat.h>
#include <util/check.h>
#include <util/threadnames.h>
#include <util/time.h>
#include <cstdint>
#include <source_location>
@@ -53,6 +55,8 @@ struct Entry {
Category category;
Level level;
bool should_ratelimit{false}; //!< Hint for consumers if this entry should be ratelimited
SystemClock::time_point timestamp{SystemClock::now()};
std::string thread_name{util::ThreadGetInternalName()};
SourceLocation source_loc;
std::string message;
};