utility: added log levels for Loggers

This change allows setting log levels on loggers. The apps ConsoleLogger was switched to only logging warnings and
errors the FileLogger still saves all types of logs.
This commit is contained in:
Eberhard Graether
2015-02-12 10:51:43 +01:00
parent 1fd7703995
commit 0d53e69d21
8 changed files with 95 additions and 9 deletions
+3 -1
View File
@@ -12,7 +12,9 @@
void init()
{
LogManager::getInstance()->addLogger(std::make_shared<ConsoleLogger>());
std::shared_ptr<ConsoleLogger> consoleLogger = std::make_shared<ConsoleLogger>();
consoleLogger->setLogLevel(Logger::LOG_WARNINGS | Logger::LOG_ERRORS);
LogManager::getInstance()->addLogger(consoleLogger);
LogManager::getInstance()->addLogger(std::make_shared<FileLogger>());
utility::loadFontsFromDirectory("data/fonts", ".otf");