From e5764984085fd20bc06818e8312c068e6633d63d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 1 May 2024 13:27:31 +0100 Subject: Add --protocoldebug, make --debug default to DEBUG not RAWIO. --- src/logging.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/logging.cpp') diff --git a/src/logging.cpp b/src/logging.cpp index 809561056..01cb87d3c 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -182,8 +182,17 @@ void Log::Manager::EnableDebugMode() { TokenList types = std::string("*"); MethodPtr method = stdoutlog.Create(ServerInstance->Config->EmptyTag); - loggers.emplace_back(Level::RAWIO, std::move(types), std::move(method), false, &stdoutlog); - ServerInstance->Config->RawLog = true; + + if (ServerInstance->Config->CommandLine.forceprotodebug) + { + // 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); + ServerInstance->Config->RawLog = true; + } + else + { + loggers.emplace_back(Level::DEBUG, std::move(types), std::move(method), false, &stdoutlog); + } } void Log::Manager::OpenLogs(bool requiremethods) -- cgit v1.3.1-10-gc9f91