mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-06 18:26:51 +00:00
fix clang-tidy errors
This commit is contained in:
@@ -94,9 +94,9 @@ defaultJsonLogFormat()
|
||||
struct LoggingConfiguration
|
||||
{
|
||||
bool enableConsole{};
|
||||
std::optional<std::string> directory;
|
||||
std::optional<std::string> directory{std::nullopt};
|
||||
bool isAsync{};
|
||||
Severity defaultSeverity;
|
||||
Severity defaultSeverity{Severity::DBG};
|
||||
bool jsonMode{false};
|
||||
};
|
||||
|
||||
@@ -223,7 +223,7 @@ class Logger
|
||||
|
||||
if (jsonMode_)
|
||||
{
|
||||
detail::appendJsonField(messageParams_, p.name(), p.value());
|
||||
detail::appendJsonField(messageParams_, p.name(), std::move(p).value());
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
||||
@@ -179,10 +179,17 @@ public:
|
||||
|
||||
/** @brief Get the parameter value. */
|
||||
[[nodiscard]] T const&
|
||||
value() const
|
||||
value() const&
|
||||
{
|
||||
return value_;
|
||||
}
|
||||
|
||||
/** @brief Get the parameter value. */
|
||||
[[nodiscard]] T&&
|
||||
value() &&
|
||||
{
|
||||
return std::move(value_);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -231,6 +238,7 @@ template <typename... Ts>
|
||||
[[nodiscard]] std::string
|
||||
buildJsonPattern(std::string_view existingPattern, log::Parameter<Ts> const&... params)
|
||||
{
|
||||
// NOLINTNEXTLINE(misc-const-correctness)
|
||||
detail::JsonLoggingPatternBuilder builder(existingPattern);
|
||||
(builder.add(params.name(), params.value()), ...);
|
||||
return builder.build();
|
||||
|
||||
Reference in New Issue
Block a user