From 1eae3c2ad42df386967afa42ed13cc95e7a0dd91 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 11 Apr 2008 23:27:27 +0000 Subject: Remove 'default log' and (wtf?) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9460 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 67faee8f5..d2fbca6f6 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -281,38 +281,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) */ + /* This function only happens at startup now */ if (Config->nofork) { this->Logs->SetupNoFork(); } - if (!Config->writelog) return true; // Skip opening default log if -nolog Config->MyDir = Config->GetFullProgDir(); - - if (!*this->LogFileName) - { - if (Config->logpath.empty()) - { - Config->logpath = Config->MyDir + "/ircd.log"; - } - - Config->log_file = fopen(Config->logpath.c_str(),"a+"); - } - else - { - Config->log_file = fopen(this->LogFileName,"a+"); - } - - if (!Config->log_file) - { - return false; - } - - FileWriter* fw = new FileWriter(this, Config->log_file); - FileLogStream *f = new FileLogStream(this, (Config->forcedebug ? DEBUG : Config->LogLevel), fw); - - this->Logs->AddLogType("*", f, true); - return true; } -- cgit v1.2.3