diff options
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r-- | src/helperfuncs.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 8e9f4dfd5..8cb62e72f 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -303,6 +303,12 @@ bool InspIRCd::IsSID(const std::string &str) /* open the proper logfile */ bool InspIRCd::OpenLog(char**, int) { + /* This function only happens at startup now (log reopening is done at OnReadConfig stage now instead of rehash) */ + if (Config->nofork) + { + this->Logs->SetupNoFork(); + } + if (!Config->writelog) return true; // Skip opening default log if -nolog Config->MyDir = Config->GetFullProgDir(); if (!*this->LogFileName) @@ -325,9 +331,10 @@ bool InspIRCd::OpenLog(char**, int) } FileWriter* fw = new FileWriter(this, Config->log_file); - FileLogStream *f = new FileLogStream(this, Config->LogLevel, fw); + FileLogStream *f = new FileLogStream(this, (Config->forcedebug ? DEBUG : Config->LogLevel), fw); + + this->Logs->AddLogType("*", f, true); - this->Logs->AddLogType("*", f); return true; } |