2007-07-25 11:54:08 +00:00
|
|
|
/* +------------------------------------+
|
|
|
|
* | Inspire Internet Relay Chat Daemon |
|
|
|
|
* +------------------------------------+
|
|
|
|
*
|
2009-01-02 18:16:05 +00:00
|
|
|
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
|
2009-03-15 12:42:35 +00:00
|
|
|
* See: http://wiki.inspircd.org/Credits
|
2007-07-25 11:54:08 +00:00
|
|
|
*
|
|
|
|
* This program is free but copyrighted software; see
|
|
|
|
* the file COPYING for details.
|
|
|
|
*
|
|
|
|
* ---------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LOG_H__
|
|
|
|
#define __LOG_H__
|
|
|
|
|
2008-02-10 20:07:30 +00:00
|
|
|
#include "logger.h"
|
|
|
|
|
2007-07-25 11:54:08 +00:00
|
|
|
/** Debug levels for use with InspIRCd::Log()
|
|
|
|
* */
|
|
|
|
enum DebugLevel
|
|
|
|
{
|
|
|
|
DEBUG = 10,
|
|
|
|
VERBOSE = 20,
|
|
|
|
DEFAULT = 30,
|
|
|
|
SPARSE = 40,
|
|
|
|
NONE = 50
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* Forward declaration -- required */
|
|
|
|
class InspIRCd;
|
|
|
|
|
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:
|
2008-02-10 20:07:30 +00:00
|
|
|
FileLogStream(InspIRCd *Instance, int 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
|
|
|
|
2008-02-09 21:00:07 +00:00
|
|
|
virtual void OnLog(int loglevel, const std::string &type, const std::string &msg);
|
2008-02-09 12:41:17 +00:00
|
|
|
};
|
2007-07-25 11:54:08 +00:00
|
|
|
|
|
|
|
#endif
|
2008-09-20 21:14:25 +00:00
|
|
|
|