MyGUI_ConsoleLogListener.cpp
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#include "MyGUI_Precompiled.h"
#include "MyGUI_ConsoleLogListener.h"
namespace MyGUI
{
void ConsoleLogListener::log(
std::string_view /*_section*/,
LogLevel /*unused*/,
const struct tm* /*unused*/,
std::string_view _message,
std::string_view /*unused*/,
int /*unused*/)
{
if (mEnabled)
std::cout << _message << std::endl;
}
bool ConsoleLogListener::getEnabled() const
{
return mEnabled;
}
void ConsoleLogListener::setEnabled(bool _value)
{
mEnabled = _value;
}
} // 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