]> git.lizzy.rs Git - irrlicht.git/blob - include/ILogger.h
Add back LightManager
[irrlicht.git] / include / ILogger.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __I_LOGGER_H_INCLUDED__\r
6 #define __I_LOGGER_H_INCLUDED__\r
7 \r
8 #include "IReferenceCounted.h"\r
9 \r
10 namespace irr\r
11 {\r
12 \r
13 //! Possible log levels.\r
14 //! When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing.\r
15 //! When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE\r
16 //! messages are never filtered and always printed.\r
17 enum ELOG_LEVEL\r
18 {\r
19         //! Used for printing information helpful in debugging\r
20         ELL_DEBUG,\r
21 \r
22         //! Useful information to print. For example hardware infos or something started/stopped.\r
23         ELL_INFORMATION,\r
24 \r
25         //! Warnings that something isn't as expected and can cause oddities\r
26         ELL_WARNING,\r
27 \r
28         //! Something did go wrong.\r
29         ELL_ERROR,\r
30 \r
31         //! Logs with ELL_NONE will never be filtered.\r
32         //! And used as filter it will remove all logging except ELL_NONE messages.\r
33         ELL_NONE\r
34 };\r
35 \r
36 \r
37 //! Interface for logging messages, warnings and errors\r
38 class ILogger : public virtual IReferenceCounted\r
39 {\r
40 public:\r
41 \r
42         //! Destructor\r
43         virtual ~ILogger() {}\r
44 \r
45         //! Returns the current set log level.\r
46         virtual ELOG_LEVEL getLogLevel() const = 0;\r
47 \r
48         //! Sets a new log level.\r
49         /** With this value, texts which are sent to the logger are filtered\r
50         out. For example setting this value to ELL_WARNING, only warnings and\r
51         errors are printed out. Setting it to ELL_INFORMATION, which is the\r
52         default setting, warnings, errors and informational texts are printed\r
53         out.\r
54         \param ll: new log level filter value. */\r
55         virtual void setLogLevel(ELOG_LEVEL ll) = 0;\r
56 \r
57         //! Prints out a text into the log\r
58         /** \param text: Text to print out.\r
59         \param ll: Log level of the text. If the text is an error, set\r
60         it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it\r
61         is just an informational text, set it to ELL_INFORMATION. Texts are\r
62         filtered with these levels. If you want to be a text displayed,\r
63         independent on what level filter is set, use ELL_NONE. */\r
64         virtual void log(const c8* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0;\r
65 \r
66         //! Prints out a text into the log\r
67         /** \param text: Text to print out.\r
68         \param hint: Additional info. This string is added after a " :" to the\r
69         string.\r
70         \param ll: Log level of the text. If the text is an error, set\r
71         it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it\r
72         is just an informational text, set it to ELL_INFORMATION. Texts are\r
73         filtered with these levels. If you want to be a text displayed,\r
74         independent on what level filter is set, use ELL_NONE. */\r
75         virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;\r
76         virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;\r
77 \r
78         //! Prints out a text into the log\r
79         /** \param text: Text to print out.\r
80         \param hint: Additional info. This string is added after a " :" to the\r
81         string.\r
82         \param ll: Log level of the text. If the text is an error, set\r
83         it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it\r
84         is just an informational text, set it to ELL_INFORMATION. Texts are\r
85         filtered with these levels. If you want to be a text displayed,\r
86         independent on what level filter is set, use ELL_NONE. */\r
87         virtual void log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;\r
88 \r
89         //! Prints out a text into the log\r
90         /** \param text: Text to print out.\r
91         \param ll: Log level of the text. If the text is an error, set\r
92         it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it\r
93         is just an informational text, set it to ELL_INFORMATION. Texts are\r
94         filtered with these levels. If you want to be a text displayed,\r
95         independent on what level filter is set, use ELL_NONE. */\r
96         virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0;\r
97 };\r
98 \r
99 } // end namespace\r
100 \r
101 #endif\r
102 \r