MyGUI: MyGUI_LogSource.h Source File

MyGUI 3.2.2

MyGUI_LogSource.h
Go to the documentation of this file.
1 /*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7 #ifndef MYGUI_LOG_SOURCE_H_
8 #define MYGUI_LOG_SOURCE_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_ILogFilter.h"
12 #include "MyGUI_ILogListener.h"
13 #include <vector>
14
15 namespace MyGUI
16 {
17
18 class MYGUI_EXPORT LogSource
19 {
20 public:
21 LogSource();
22 ~LogSource();
23
25 void setLogFilter(ILogFilter* _filter);
27 void addLogListener(ILogListener* _lestener);
28
30 void open();
32 void close();
34 void flush();
36 void log(const std::string& _section, LogLevel _level, const struct tm* _time, const std::string& _message, const char* _file, int _line);
37
38 private:
39 typedef std::vector<ILogListener*> VectorLogListeners;
40 VectorLogListeners mListeners;
41 ILogFilter* mFilter;
42 };
43
44 } // namespace MyGUI
45
46 #endif // MYGUI_LOG_SOURCE_H_
MyGUI::LogSource
Definition: MyGUI_LogSource.h:18
MyGUI_ILogListener.h
MyGUI::ILogFilter
Definition: MyGUI_ILogFilter.h:16
MyGUI_ILogFilter.h
MyGUI_Prerequest.h
MyGUI::ILogListener
Definition: MyGUI_ILogListener.h:16
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI::LogLevel
Definition: MyGUI_LogLevel.h:15
MyGUI
Definition: MyGUI_ActionController.h:14