MyGUI 3.4.3
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:
22 void setLogFilter(ILogFilter* _filter);
24 void addLogListener(ILogListener* _lestener);
25
27 void open();
29 void close();
31 void flush();
33 void log(
34 std::string_view _section,
35 LogLevel _level,
36 const struct tm* _time,
37 std::string_view _message,
38 std::string_view _file,
39 int _line);
40
41 private:
42 using VectorLogListeners = std::vector<ILogListener*>;
43 VectorLogListeners mListeners;
44 ILogFilter* mFilter{nullptr};
45 };
46
47} // namespace MyGUI
48
49#endif // MYGUI_LOG_SOURCE_H_
#define MYGUI_EXPORT