MyGUI: MyGUI_LevelLogFilter.cpp Source File

MyGUI 3.4.3

MyGUI_LevelLogFilter.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_LevelLogFilter.h"
9
10namespace MyGUI
11{
12
13 LevelLogFilter::LevelLogFilter() :
14 mLevel(LogLevel::Info)
15 {
16 }
17
18 bool LevelLogFilter::shouldLog(
19 std::string_view /*_section*/,
20 LogLevel _level,
21 const struct tm* /*_time*/,
22 std::string_view /*_message*/,
23 std::string_view /*_file*/,
24 int /*_line*/)
25 {
26 return mLevel <= _level;
27 }
28
29 void LevelLogFilter::setLoggingLevel(LogLevel _value)
30 {
31 mLevel = _value;
32 }
33
34 LogLevel LevelLogFilter::getLoggingLevel() const
35 {
36 return mLevel;
37 }
38
39} // namespace MyGUI
MyGUI_LevelLogFilter.h
MyGUI_Precompiled.h
MyGUI::LevelLogFilter::LevelLogFilter
LevelLogFilter()
Definition MyGUI_LevelLogFilter.cpp:13
MyGUI::LevelLogFilter::getLoggingLevel
LogLevel getLoggingLevel() const
Definition MyGUI_LevelLogFilter.cpp:34
MyGUI::LevelLogFilter::shouldLog
bool shouldLog(std::string_view _section, LogLevel _level, const struct tm *_time, std::string_view _message, std::string_view _file, int _line) override
Definition MyGUI_LevelLogFilter.cpp:18
MyGUI::LevelLogFilter::setLoggingLevel
void setLoggingLevel(LogLevel _value)
Definition MyGUI_LevelLogFilter.cpp:29
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::LogLevel
Definition MyGUI_LogLevel.h:19