X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Flogger.cpp;h=89b2be019721289c241b4839bb591820215b1b84;hb=4e3d7a6e30eadf714483994681b8b2534229f4a8;hp=2e3f556c6c7ddb4eded7afef28739e51326453d3;hpb=43d893c7196dfa159b39fc5de3a10f00d59200b4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/logger.cpp b/src/logger.cpp index 2e3f556c6..89b2be019 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -1,16 +1,25 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon + * + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2008 Craig Edwards + * Copyright (C) 2008 Thomas Stagner + * Copyright (C) 2008 Robin Burchell * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. * - * This program is free but copyrighted software; see - * the file COPYING for details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * --------------------------------------------------- + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + #include "inspircd.h" #include "filelogger.h" @@ -53,6 +62,11 @@ LogManager::~LogManager() void LogManager::OpenFileLogs() { + if (ServerInstance->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 +133,8 @@ void LogManager::OpenFileLogs() void LogManager::CloseLogs() { + if (ServerInstance->Config && ServerInstance->Config->cmdline.forcedebug) + return; std::map >().swap(LogStreams); /* Clear it */ std::map >().swap(GlobalLogStreams); /* Clear it */ for (std::map::iterator i = AllLogStreams.begin(); i != AllLogStreams.end(); ++i)