mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Set module name in json
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
This commit is contained in:
@@ -337,6 +337,7 @@ public:
|
|||||||
reset(
|
reset(
|
||||||
std::source_location location,
|
std::source_location location,
|
||||||
severities::Severity severity,
|
severities::Severity severity,
|
||||||
|
std::string_view moduleName,
|
||||||
std::string_view journalAttributesJson) noexcept;
|
std::string_view journalAttributesJson) noexcept;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ void
|
|||||||
Journal::JsonLogContext::reset(
|
Journal::JsonLogContext::reset(
|
||||||
std::source_location location,
|
std::source_location location,
|
||||||
severities::Severity severity,
|
severities::Severity severity,
|
||||||
|
std::string_view moduleName,
|
||||||
std::string_view journalAttributesJson) noexcept
|
std::string_view journalAttributesJson) noexcept
|
||||||
{
|
{
|
||||||
struct ThreadIdStringInitializer
|
struct ThreadIdStringInitializer
|
||||||
@@ -161,6 +162,8 @@ Journal::JsonLogContext::reset(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
writer().writeKey("ModuleName");
|
||||||
|
writer().writeString(moduleName);
|
||||||
writer().writeKey("MessageParams");
|
writer().writeKey("MessageParams");
|
||||||
writer().startObject();
|
writer().startObject();
|
||||||
|
|
||||||
@@ -191,7 +194,7 @@ Journal::initMessageContext(
|
|||||||
std::source_location location,
|
std::source_location location,
|
||||||
severities::Severity severity) const
|
severities::Severity severity) const
|
||||||
{
|
{
|
||||||
currentJsonLogContext_.reset(location, severity, m_attributesJson);
|
currentJsonLogContext_.reset(location, severity, m_name, m_attributesJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string_view
|
std::string_view
|
||||||
|
|||||||
Reference in New Issue
Block a user