]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/filelogger.cpp
Make sure usage lines up neatly.
[user/henk/code/inspircd.git] / src / filelogger.cpp
index b0eb77310eca945fb875a2dd62bdbe2173d7ee27..b99b9e5bbd05dabc9689aaa3b67ec0d6bea1d2bf 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: libIRCDfilelogger */
+/* $Core */
 
 #include "inspircd.h"
 #include <fstream>
@@ -42,7 +42,9 @@ void FileLogStream::OnLog(int loglevel, const std::string &type, const std::stri
 
        /* If we were given -debug we output all messages, regardless of configured loglevel */
        if ((loglevel < this->loglvl) && !ServerInstance->Config->forcedebug)
+       {
                return;
+       }
 
        if (ServerInstance->Time() != LAST)
        {
@@ -54,14 +56,6 @@ void FileLogStream::OnLog(int loglevel, const std::string &type, const std::stri
                LAST = ServerInstance->Time();
        }
 
-       if (ServerInstance->Config->log_file && ServerInstance->Config->writelog)
-       {
-               std::string out = std::string(TIMESTR) + " " + text.c_str() + "\n";
-               this->f->WriteLogLine(out);
-       }
-
-       if (ServerInstance->Config->nofork)
-       {
-               printf("%s %s\n", TIMESTR, text.c_str());
-       }
+       std::string out = std::string(TIMESTR) + " " + text.c_str() + "\n";
+       this->f->WriteLogLine(out);
 }