2012-04-19 20:58:29 +02:00
|
|
|
/*
|
|
|
|
* InspIRCd -- Internet Relay Chat Daemon
|
2007-07-25 11:54:08 +00:00
|
|
|
*
|
2012-04-19 20:58:29 +02:00
|
|
|
* Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
|
|
|
|
* Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
|
2007-07-25 11:54:08 +00:00
|
|
|
*
|
2012-04-19 20:58:29 +02:00
|
|
|
* 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.
|
2007-07-25 11:54:08 +00:00
|
|
|
*
|
2012-04-19 20:58:29 +02:00
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
2007-07-25 11:54:08 +00:00
|
|
|
*/
|
|
|
|
|
2012-04-19 20:58:29 +02:00
|
|
|
|
2013-04-02 20:12:15 +01:00
|
|
|
#pragma once
|
2007-07-25 11:54:08 +00:00
|
|
|
|
2008-02-10 20:07:30 +00:00
|
|
|
#include "logger.h"
|
|
|
|
|
2008-09-20 21:14:25 +00:00
|
|
|
/** A logging class which logs to a streamed file.
|
|
|
|
*/
|
2008-02-09 12:41:17 +00:00
|
|
|
class CoreExport FileLogStream : public LogStream
|
|
|
|
{
|
|
|
|
private:
|
2008-02-10 20:07:30 +00:00
|
|
|
FileWriter *f;
|
2008-02-09 12:41:17 +00:00
|
|
|
public:
|
2013-04-19 10:26:54 +01:00
|
|
|
FileLogStream(LogLevel loglevel, FileWriter *fw);
|
2008-02-09 12:41:17 +00:00
|
|
|
|
2008-02-10 20:07:30 +00:00
|
|
|
virtual ~FileLogStream();
|
2008-02-09 13:18:41 +00:00
|
|
|
|
2013-04-19 10:26:54 +01:00
|
|
|
virtual void OnLog(LogLevel loglevel, const std::string &type, const std::string &msg);
|
2008-02-09 12:41:17 +00:00
|
|
|
};
|