MyGUI 3.4.1
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
15namespace MyGUI
16{
17
19 {
20 public:
21 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 using VectorLogListeners = std::vector<ILogListener*>;
40 VectorLogListeners mListeners;
41 ILogFilter* mFilter;
42 };
43
44} // namespace MyGUI
45
46#endif // MYGUI_LOG_SOURCE_H_
#define MYGUI_EXPORT