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