Route all logging through the Void::Log facade
Delete the echoion Logger adapter (Logger.{hpp,cpp}) and the
ILogger/LoggerRegistry indirection. Core::installLogging() builds the
console + split-file Void::Logging::MultiLogger and installs it as the
process-wide Void::Log sink via Void::Log::make_sink (logSink_ owns it for
the process lifetime). The ~450 ECHOION_LOG_* call sites across EchoionCore
are rewritten to Void::Log::<level>("<Subsystem>", "{}", <expr>) with
per-file module tags (warning->warn, critical->fatal); the pre-formatted
message is passed as the single "{}" argument. Build green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
0e08ccaefa
commit
2d7651c308
42 files changed
+550
-792
No files matched your search
@@ -1,4 +1,4 @@
|
||||
#include "echoion/core/Logger.hpp"
|
||||
#include <Void/Log/Log.hpp>
|
||||
#include "echoion/core/NetworkClient.hpp"
|
||||
#include <Void/Functional/Retry.hpp>
|
||||
#include <Void/Net/Http.hpp>
|
||||
@@ -15,7 +15,7 @@ namespace Echoion::Core
|
||||
{
|
||||
proxy_ = proxy;
|
||||
initialized_ = true;
|
||||
ECHOION_LOG_INFO(std::format("NetworkClient initialized (proxy: {})",
|
||||
Void::Log::info("NetworkClient", "{}", std::format("NetworkClient initialized (proxy: {})",
|
||||
proxy.has_value() ? "enabled" : "disabled"));
|
||||
return {};
|
||||
}
|
||||
@@ -46,7 +46,7 @@ namespace Echoion::Core
|
||||
retryPolicy_, [&] { return executeRequest(req); },
|
||||
[this](const Api::Result<Void::Net::Response>& result) {
|
||||
if (!result) {
|
||||
ECHOION_LOG_WARNING(std::format(
|
||||
Void::Log::warn("NetworkClient", "{}", std::format(
|
||||
"Request error: {}, retrying", result.error().message));
|
||||
return true;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace Echoion::Core
|
||||
const auto& codes = retryableStatusCodes_;
|
||||
if (std::find(codes.begin(), codes.end(), result->status) !=
|
||||
codes.end()) {
|
||||
ECHOION_LOG_WARNING(
|
||||
Void::Log::warn("NetworkClient", "{}",
|
||||
std::format("Request failed with status {}, retrying",
|
||||
result->status));
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user