MyGUI: MyGUI_ConsoleLogListener.cpp Source File

MyGUI 3.4.3

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