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,5 +1,5 @@
|
||||
#include "echoion/core/CommandManager.hpp"
|
||||
#include "echoion/core/Logger.hpp"
|
||||
#include <Void/Log/Log.hpp>
|
||||
#include "echoion/core/MusicManager.hpp"
|
||||
#include "echoion/core/commands/Command.hpp"
|
||||
#include <ConfigTypes.hpp>
|
||||
@@ -82,7 +82,7 @@ namespace Echoion::Core
|
||||
|
||||
ctx.reply(helpMsg);
|
||||
} catch (const std::exception& e) {
|
||||
ECHOION_LOG_ERROR(
|
||||
Void::Log::error("CommandManager", "{}",
|
||||
std::format("Help command exception: {}", e.what()));
|
||||
ctx.reply("Couldn't generate help. Please try again.");
|
||||
}
|
||||
@@ -128,7 +128,7 @@ namespace Echoion::Core
|
||||
{
|
||||
pool_ =
|
||||
std::make_unique<Void::Concurrency::ThreadPool>(THREAD_POOL_SIZE);
|
||||
ECHOION_LOG_INFO(
|
||||
Void::Log::info("CommandManager", "{}",
|
||||
std::format("CommandManager thread pool started with {} workers",
|
||||
THREAD_POOL_SIZE));
|
||||
}
|
||||
@@ -197,7 +197,7 @@ namespace Echoion::Core
|
||||
command->execute(ctx);
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
ECHOION_LOG_ERROR(
|
||||
Void::Log::error("CommandManager", "{}",
|
||||
std::format("Async command execution error: {}", e.what()));
|
||||
try {
|
||||
task.replyFunc(
|
||||
@@ -338,7 +338,7 @@ namespace Echoion::Core
|
||||
try {
|
||||
command->execute(ctx);
|
||||
} catch (const std::exception& e) {
|
||||
ECHOION_LOG_ERROR(std::format(
|
||||
Void::Log::error("CommandManager", "{}", std::format(
|
||||
"Command execution error [{}]: {}", cmdKey, e.what()));
|
||||
ctx.reply(
|
||||
"An unexpected error occurred. Our team has been notified.");
|
||||
|
||||
Reference in new issue
Block a user