From 280ecaca310e65325a398dfbdfa72b88ff4b2b7b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 30 Apr 2026 19:52:37 +0100 Subject: Move CommandLine from ServerConfig to InspIRCd. There's no need for this to be in ServerConfig. Although it is configuration it applies more to the cli interface which is part of the InspIRCd class. --- src/logging.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/logging.cpp') diff --git a/src/logging.cpp b/src/logging.cpp index 4cb5b3a6b..9121c8490 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -200,12 +200,12 @@ void Log::Manager::CloseLogs() logging = false; } -void Log::Manager::EnableDebugMode() +void Log::Manager::EnableDebugMode(bool rawio) { TokenList types = std::string("*"); MethodPtr method = std::make_shared(); - if (ServerInstance->Config->CommandLine.forceprotodebug) + if (rawio) { // If we are doing a protocol debug we need to warn users. loggers.emplace_back(Level::RAWIO, std::move(types), std::move(method), false, &stdoutlog); @@ -220,16 +220,16 @@ void Log::Manager::EnableDebugMode() void Log::Manager::OpenLogs(bool requiremethods) { // If the server is started in debug mode we don't write logs. - if (ServerInstance->Config->CommandLine.forcedebug) + if (ServerInstance->CommandLine.forcedebug) { - const auto* option = ServerInstance->Config->CommandLine.forceprotodebug ? "--protocoldebug" : "--debug"; + const auto* option = ServerInstance->CommandLine.forceprotodebug ? "--protocoldebug" : "--debug"; Normal("LOG", "Not opening loggers because we were started with {}", option); CheckLevel(); return; } // If the server is started with logging disabled we don't write logs. - if (!ServerInstance->Config->CommandLine.writelog) + if (!ServerInstance->CommandLine.writelog) { Normal("LOG", "Not opening loggers because we were started with --nolog"); CheckLevel(); -- cgit v1.3.1-10-gc9f91