summaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
authorDaniel De Graaf <danieldg@inspircd.org>2010-05-08 14:25:00 -0500
committerDaniel De Graaf <danieldg@inspircd.org>2010-05-08 14:25:00 -0500
commitf3dc5572200b4bce6b09448ac4660e2d889cb038 (patch)
tree0c837c935653aa6f8609bbc0fcced8b842c30f47 /src/logger.cpp
parentcb4c516ace8fef75b8a54a141c3644af9697ac0a (diff)
Change -debug to force RAWIO level logging and disable all other logs
Diffstat (limited to 'src/logger.cpp')
-rw-r--r--src/logger.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index 2e3f556c6..41363b414 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -53,6 +53,11 @@ LogManager::~LogManager()
void LogManager::OpenFileLogs()
{
+ if (Config->cmdline.forcedebug)
+ {
+ ServerInstance->Config->RawLog = true;
+ return;
+ }
/* Skip rest of logfile opening if we are running -nolog. */
if (!ServerInstance->Config->cmdline.writelog)
return;
@@ -119,6 +124,8 @@ void LogManager::OpenFileLogs()
void LogManager::CloseLogs()
{
+ if (Config->cmdline.forcedebug)
+ return;
std::map<std::string, std::vector<LogStream*> >().swap(LogStreams); /* Clear it */
std::map<LogStream*, std::vector<std::string> >().swap(GlobalLogStreams); /* Clear it */
for (std::map<LogStream*, int>::iterator i = AllLogStreams.begin(); i != AllLogStreams.end(); ++i)