1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 #ifndef __LOGMANAGER_H
15 #define __LOGMANAGER_H
17 class CoreExport LogStream : public classbase
20 InspIRCd *ServerInstance;
23 LogStream(InspIRCd *Instance, const std::string &type)
25 this->ServerInstance = Instance;
29 virtual void OnLog(int loglevel, const std::string &msg);
32 class CoreExport LogManager : public classbase
35 InspIRCd *ServerInstance;
36 std::map<std::string, std::vector<LogStream *> > LogStreams;
38 LogManager(InspIRCd *Instance)
40 ServerInstance = Instance;
43 bool AddLogType(const std::string &type, LogStream *l);
44 bool DelLogType(const std::string &type, LogStream *l);
45 void Log(const std::string &type, int loglevel, const std::string &msg);