MyGUI: MyGUI_ConsoleLogListener.cpp Source File

MyGUI 3.4.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_ConsoleLogListener.cpp
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#include "MyGUI_Precompiled.h"
8#include "MyGUI_ConsoleLogListener.h"
9
10namespace MyGUI
11{
12
13 ConsoleLogListener::ConsoleLogListener() :
14 mEnabled(true)
15 {
16 }
17
18 void ConsoleLogListener::log(const std::string& _section, LogLevel _level, const struct tm* _time, const std::string& _message, const char* _file, int _line)
19 {
20 if (mEnabled)
21 std::cout << _message << std::endl;
22 }
23
24 bool ConsoleLogListener::getEnabled() const
25 {
26 return mEnabled;
27 }
28
29 void ConsoleLogListener::setEnabled(bool _value)
30 {
31 mEnabled = _value;
32 }
33
34} // namespace MyGUI
MyGUI_ConsoleLogListener.h
MyGUI_Precompiled.h
MyGUI::ConsoleLogListener::setEnabled
void setEnabled(bool _value)
Definition MyGUI_ConsoleLogListener.cpp:29
MyGUI::ConsoleLogListener::getEnabled
bool getEnabled() const
Definition MyGUI_ConsoleLogListener.cpp:24
MyGUI::ConsoleLogListener::ConsoleLogListener
ConsoleLogListener()
Definition MyGUI_ConsoleLogListener.cpp:13
MyGUI::ConsoleLogListener::log
void log(const std::string &_section, LogLevel _level, const struct tm *_time, const std::string &_message, const char *_file, int _line) override
Definition MyGUI_ConsoleLogListener.cpp:18
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::LogLevel
Definition MyGUI_LogLevel.h:19