* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
#ifndef __LOG_H__
#define __LOG_H__
-#include <time.h>
-#include <string>
-#include <sstream>
-#include "socketengine.h"
-
-
/** Debug levels for use with InspIRCd::Log()
* */
enum DebugLevel
protected:
/** The creator/owner of this object
*/
- InspIRCd* ServerInstance;
+ InspIRCd* ServerInstance;
/** The log file (fd is inside this somewhere,
* we get it out with fileno())
*/
virtual ~FileLogger();
};
+class CoreExport FileLogStream : public LogStream
+{
+ private:
+ FileLogger *f;
+ public:
+ FileLogStream(InspIRCd *Instance, int loglevel, FILE *f) : LogStream(Instance, loglevel)
+ {
+ this->f = new FileLogger(Instance, f);
+ }
+
+ ~FileLogStream()
+ {
+ delete this->f;
+ }
+
+ virtual void OnLog(int loglevel, const std::string &type, const std::string &msg);
+};
#endif