summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-11 23:27:27 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-11 23:27:27 +0000
commit1eae3c2ad42df386967afa42ed13cc95e7a0dd91 (patch)
treeb1bcd519c9f290842eb1637f30b55a1a825fc9e8 /src/helperfuncs.cpp
parentc1ca268121c9c4d47614c28683a5c4f6bc461092 (diff)
Remove 'default log' and <options:loglevel> (wtf?)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9460 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp28
1 files changed, 1 insertions, 27 deletions
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;
}