summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp2
-rw-r--r--src/logger.cpp7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index c6faf8802..b4a013e50 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -457,7 +457,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
if (do_debug)
{
FileWriter* fw = new FileWriter(stdout);
- FileLogStream* fls = new FileLogStream(DEBUG, fw);
+ FileLogStream* fls = new FileLogStream(RAWIO, fw);
Logs->AddLogTypes("*", fls, true);
}
else if (!this->OpenLog(argv, argc))
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)