Use OpenMW logging levels for MyGUI log (feature 7130)

7220-lua-add-a-general-purpose-lexical-parser
Andrei Kortunov 1 year ago
parent 7f117a28c8
commit b217d1fc36

@ -37,6 +37,7 @@
Feature #6995: Localize the "show effect duration" option
Feature #7058: Implement TestModels (T3D) console command
Feature #7087: Block resolution change in the Windowed Fullscreen mode
Feature #7130: Ability to set MyGUI logging verbosity
0.48.0
------

@ -37,4 +37,17 @@ namespace osgMyGUI
<< separator << _line << std::endl;
}
}
MyGUI::LogLevel LogFacility::getCurrentLogLevel() const
{
switch (Debug::CurrentDebugLevel)
{
case Debug::Error:
return MyGUI::LogLevel::Error;
case Debug::Warning:
return MyGUI::LogLevel::Warning;
default:
return MyGUI::LogLevel::Info;
}
}
}

@ -47,12 +47,14 @@ namespace osgMyGUI
MyGUI::LevelLogFilter mFilter;
MyGUI::LogSource mSource;
MyGUI::LogLevel getCurrentLogLevel() const;
public:
LogFacility(const std::filesystem::path& output, bool console)
: mFile(output)
{
mConsole.setEnabled(console);
mFilter.setLoggingLevel(MyGUI::LogLevel::Info);
mFilter.setLoggingLevel(getCurrentLogLevel());
mSource.addLogListener(&mFile);
mSource.addLogListener(&mConsole);

Loading…
Cancel
Save