mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 19:25:51 +00:00
@@ -206,7 +206,7 @@ public:
|
||||
write(
|
||||
beast::severities::Severity level,
|
||||
std::string const& partition,
|
||||
std::string text,
|
||||
std::string const& text,
|
||||
bool console);
|
||||
|
||||
std::string
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
static void
|
||||
format(
|
||||
std::string& output,
|
||||
std::string message,
|
||||
std::string const& message,
|
||||
beast::severities::Severity severity,
|
||||
std::string const& partition);
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ enum Severity {
|
||||
kNone = kDisabled
|
||||
};
|
||||
|
||||
std::string
|
||||
std::string_view
|
||||
to_string(Severity severity);
|
||||
} // namespace severities
|
||||
|
||||
|
||||
@@ -200,11 +200,11 @@ void
|
||||
Logs::write(
|
||||
beast::severities::Severity level,
|
||||
std::string const& partition,
|
||||
std::string text,
|
||||
std::string const& text,
|
||||
bool console)
|
||||
{
|
||||
std::string s;
|
||||
format(s, std::move(text), level, partition);
|
||||
format(s, text, level, partition);
|
||||
file_.writeln(s);
|
||||
if (!silent_)
|
||||
std::cerr << s << '\n';
|
||||
@@ -332,14 +332,14 @@ Logs::fromString(std::string const& s)
|
||||
void
|
||||
Logs::format(
|
||||
std::string& output,
|
||||
std::string message,
|
||||
std::string const& message,
|
||||
beast::severities::Severity severity,
|
||||
std::string const& partition)
|
||||
{
|
||||
output = std::move(message);
|
||||
output = message;
|
||||
if (!beast::Journal::isStructuredJournalEnabled())
|
||||
{
|
||||
output.reserve(message.size() + partition.size() + 100);
|
||||
output.reserve(output.size() + partition.size() + 100);
|
||||
output += to_string(std::chrono::system_clock::now());
|
||||
|
||||
output += " ";
|
||||
|
||||
@@ -98,7 +98,7 @@ Journal::getNullSink()
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
std::string
|
||||
std::string_view
|
||||
severities::to_string(Severity severity)
|
||||
{
|
||||
switch (severity)
|
||||
@@ -185,7 +185,7 @@ Journal::JsonLogContext::reset(
|
||||
value = threadIdStream.str();
|
||||
}
|
||||
};
|
||||
thread_local ThreadIdStringInitializer threadId;
|
||||
thread_local ThreadIdStringInitializer const threadId;
|
||||
|
||||
attributes_.SetObject();
|
||||
if (globalLogAttributes_.has_value())
|
||||
|
||||
Reference in New Issue
Block a user