diff options
Diffstat (limited to 'project2/common/logger.cpp')
-rw-r--r-- | project2/common/logger.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/project2/common/logger.cpp b/project2/common/logger.cpp index 98aaf0b..f21bd40 100644 --- a/project2/common/logger.cpp +++ b/project2/common/logger.cpp @@ -2,7 +2,7 @@ #define SYSLOG_NAMES 1 // Enables the definition of names in syslog.h #include "logger.h" -#include "instanceStore.impl.h" +#include "loggerFactory.h" Log Logger::log; @@ -17,7 +17,7 @@ Log::~Log() } void -Log::setLoggerAt(LogDriverLoader * ldr, int level) +Log::setLoggerAt(LogDriverFactory * ldr, int level) { if (level == -1) { logs.erase(ldr); @@ -26,9 +26,9 @@ Log::setLoggerAt(LogDriverLoader * ldr, int level) logs[ldr] = ldr->create(); } lowestLevel = -1; - for (const auto & log : InstanceSet<LogDriverLoader>::GetAll()) { - if (log->loggerLevel() > lowestLevel) { - lowestLevel = log->loggerLevel(); + for (const auto & log : AdHoc::PluginManager::getDefault()->getAll<LogDriverFactory>()) { + if (log->implementation()->loggerLevel() > lowestLevel) { + lowestLevel = log->implementation()->loggerLevel(); } } } @@ -94,13 +94,3 @@ Logger::operator->() const return &log; } -LogDriverBase::LogDriverBase() -{ -} - -LogDriverBase::~LogDriverBase() -{ -} - -INSTANTIATESTORE(std::string, LogDriverLoader); - |