From dcbb0ae938711cd49df73dc2ff6cd6289aeefb44 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 21 Oct 2009 23:46:24 +0000 Subject: Move command-line items to CommandLineConf git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11949 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/logger.cpp | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) (limited to 'src/logger.cpp') diff --git a/src/logger.cpp b/src/logger.cpp index e92762b46..b265a8ea6 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -44,47 +44,18 @@ LogManager::LogManager() { - noforkstream = NULL; Logging = false; } LogManager::~LogManager() { - if (noforkstream) - { - ServerInstance->Logs = this; - delete noforkstream; - ServerInstance->Logs = NULL; - } -} - -void LogManager::SetupNoFork() -{ - if (!noforkstream) - { - FileWriter* fw = new FileWriter(stdout); - noforkstream = new FileLogStream(ServerInstance->Config->forcedebug ? DEBUG : DEFAULT, fw); - } - else - { - noforkstream->ChangeLevel(ServerInstance->Config->forcedebug ? DEBUG : DEFAULT); - } - AddLogType("*", noforkstream, false); } void LogManager::OpenFileLogs() { - /* Re-register the nofork stream if necessary. */ - if (ServerInstance->Config->nofork) - { - SetupNoFork(); - } /* Skip rest of logfile opening if we are running -nolog. */ - if (!ServerInstance->Config->writelog) - { + if (!ServerInstance->Config->cmdline.writelog) return; - } - ConfigReader Conf; std::map logmap; ConfigTagList tags = ServerInstance->Config->ConfTags("log"); for(ConfigIter i = tags.first; i != tags.second; ++i) @@ -98,10 +69,9 @@ void LogManager::OpenFileLogs() std::string type = tag->getString("type"); std::string level = tag->getString("level"); int loglevel = DEFAULT; - if (level == "debug" || ServerInstance->Config->forcedebug) + if (level == "debug") { loglevel = DEBUG; - ServerInstance->Config->debugging = true; } else if (level == "verbose") { -- cgit v1.2.3