aboutsummaryrefslogtreecommitdiff
path: root/src/logging.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-05-01 13:27:31 +0100
committerGravatar Sadie Powell2024-05-01 13:44:14 +0100
commite5764984085fd20bc06818e8312c068e6633d63d (patch)
treee1774b3d38ef9ed78917bbe9288f49683a99fc0a /src/logging.cpp
parentFix some messages that contain potentially remapped modes. (diff)
Add --protocoldebug, make --debug default to DEBUG not RAWIO.
Diffstat (limited to 'src/logging.cpp')
-rw-r--r--src/logging.cpp13
1 files changed, 11 insertions, 2 deletions
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)