]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/filelogger.cpp
Change allocation of ThreadData to be physically part of the object containing it
[user/henk/code/inspircd.git] / src / filelogger.cpp
index acb210ecbdd03c486757b546a45315904717e425..edb753a50c3b112364a977501f639315a5ff03a1 100644 (file)
  */
 
 
-/* $Core */
-
 #include "inspircd.h"
 #include <fstream>
-#include "socketengine.h"
-#include "filelogger.h"
 
 FileLogStream::FileLogStream(LogLevel loglevel, FileWriter *fw) : LogStream(loglevel), f(fw)
 {
@@ -53,12 +49,8 @@ void FileLogStream::OnLog(LogLevel loglevel, const std::string &type, const std:
                struct tm *timeinfo = localtime(&local);
 
                TIMESTR.assign(asctime(timeinfo), 24);
-               TIMESTR += ": ";
                LAST = ServerInstance->Time();
        }
 
-       std::string out = TIMESTR;
-       out += text;
-       out += '\n';
-       this->f->WriteLogLine(out);
+       this->f->WriteLogLine(TIMESTR + " " + type + ": " + text + "\n");
 }