/*
* InspIRCd -- Internet Relay Chat Daemon
*
+ * Copyright (C) 2013-2014 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2013 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ * Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
+ * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
* Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
* Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
+ * Copyright (C) 2007, 2010 Craig Edwards <brain@inspircd.org>
* Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
#include "inspircd.h"
#include <fstream>
-#include "socketengine.h"
-#include "filelogger.h"
FileLogStream::FileLogStream(LogLevel loglevel, FileWriter *fw) : LogStream(loglevel), f(fw)
{
if (ServerInstance->Time() != LAST)
{
- time_t local = ServerInstance->Time();
- struct tm *timeinfo = localtime(&local);
-
- TIMESTR.assign(asctime(timeinfo), 24);
- TIMESTR += ": ";
+ TIMESTR = InspIRCd::TimeString(ServerInstance->Time());
LAST = ServerInstance->Time();
}
- std::string out = TIMESTR;
- out += text;
- out += '\n';
- this->f->WriteLogLine(out);
+ this->f->WriteLogLine(TIMESTR + " " + type + ": " + text + "\n");
}