]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/logger.cpp
Add IP address conversion utility functions, irc::sockets::aptosa and irc::sockets...
[user/henk/code/inspircd.git] / src / logger.cpp
index 8e887830db0c10c8d97790f89e9b784482436a3f..05fb801ae76ad951d98f94ef60ee869d0e40b5f8 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -11,7 +11,7 @@
  * ---------------------------------------------------
  */
 
-/* $Core: libIRCDlogger */
+/* $Core */
 
 #include "inspircd.h"
 
@@ -31,7 +31,7 @@
  *
  * How it works:
  *  Modules create their own logstream types (core will create one for 'file logging' for example) and create instances of these logstream types
- *  and register interest in a certain logtype. Globbing is not here, with the exception of * - for all events.. loglevel is used to drop 
+ *  and register interest in a certain logtype. Globbing is not here, with the exception of * - for all events.. loglevel is used to drop
  *  events that are of no interest to a logstream.
  *
  *  When Log is called, the vector of logstreams for that type is iterated (along with the special vector for "*"), and all registered logstreams
@@ -41,7 +41,7 @@
  * NOTE: Somehow we have to let LogManager manage the non-blocking file streams and provide an interface to share them with various LogStreams,
  *       as, for example, a user may want to let 'KILL' and 'XLINE' snotices go to /home/ircd/inspircd/logs/operactions.log, or whatever. How
  *       can we accomplish this easily? I guess with a map of pre-loved logpaths, and a pointer of FILE *..
- * 
+ *
  */
 
 void LogManager::SetupNoFork()
@@ -49,11 +49,11 @@ void LogManager::SetupNoFork()
        if (!noforkstream)
        {
                FileWriter* fw = new FileWriter(ServerInstance, stdout);
-               noforkstream = new FileLogStream(ServerInstance, ServerInstance->Config->forcedebug ? DEBUG : ServerInstance->Config->LogLevel, fw);
+               noforkstream = new FileLogStream(ServerInstance, ServerInstance->Config->forcedebug ? DEBUG : DEFAULT, fw);
        }
        else
        {
-               noforkstream->ChangeLevel(ServerInstance->Config->forcedebug ? DEBUG : ServerInstance->Config->LogLevel);
+               noforkstream->ChangeLevel(ServerInstance->Config->forcedebug ? DEBUG : DEFAULT);
        }
        AddLogType("*", noforkstream, false);
 }
@@ -362,5 +362,5 @@ void FileWriter::Close()
 
 FileWriter::~FileWriter()
 {
+       this->Close();
 }
-