]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/filelogger.h
85005940d7fdf1dbb27221739e47502a367a9233
[user/henk/code/inspircd.git] / include / filelogger.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
6  * See: http://wiki.inspircd.org/Credits
7  *
8  * This program is free but copyrighted software; see
9  *      the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #ifndef __LOG_H__
15 #define __LOG_H__
16
17 #include "logger.h"
18
19 /** Debug levels for use with InspIRCd::Log()
20  *  */
21 enum DebugLevel
22 {
23     DEBUG       =   10,
24     VERBOSE     =   20,
25     DEFAULT     =   30,
26     SPARSE      =   40,
27     NONE        =   50
28 };
29
30
31 /* Forward declaration -- required */
32 class InspIRCd;
33
34 /** A logging class which logs to a streamed file.
35  */
36 class CoreExport FileLogStream : public LogStream
37 {
38  private:
39         FileWriter *f;
40  public:
41         FileLogStream(InspIRCd *Instance, int loglevel, FileWriter *fw);
42
43         virtual ~FileLogStream();
44
45         virtual void OnLog(int loglevel, const std::string &type, const std::string &msg);
46 };
47
48 #endif
49